Resize The Image And Save

I have problem with resizing a picture and don't know what the problem with the following code:

dim fs
dim sourcefile
sourcefile = uploadsDirVar & filename
set fs=Server.CreateObject("Scripting.FileSystemObject")

'to access the data of the image
dim iwidth, iHeight
dim myImg

if fs.fileExists(sourcefile) then
set myImg = loadpicture(sourcefile)
iwidth = round(myImg.width / 26.4583)
iHeight = round(myImg.height / 26.4583)

if (iwidth > 250) then
iHeight = (iHeight * 250)/iwidth
iwidth = 250
end if

If (myImg.Width > iwidth) or (myImg.Height > iHeight) Then
If (myImg.Width / iwidth) > (myImg.Height / iHeight) Then
myImg.Resize iwidth, 0
Else
myImg.Resize 0, iHeight
End If
End If

myImg.WriteFile sourcefile
set myImg = nothing
end if

set fs=nothing


when i run it, the following error occur :

Object doesn't support this property or method: 'myImg.Resize'

View Replies


ADVERTISEMENT

Image Resize

What is the best image resizing tool is out there? I want to resize images in ASP page when users upload them into some directory.

View Replies View Related

Image Resize

I need to resize images to a fixed width.
How can I hold the aspect ratio?

View Replies View Related

Image Resize

I have a page that displays a image from a folder. If the image is over a certain size I want to resize it to a given size, but if the image is smaller than the given size I set I want it to stay the same. Any ideas?

View Replies View Related

Image Resize

Has anyone managed to get ASP to do an image resize ? I know its possible easily in .NET, or by purchasing a COM object, but my server cant have either of those.
Looking to automatically create a thumbnail when a user uploads an image.

View Replies View Related

Resize Image

Can someone help me out in resizing the Gif images.

I actually eant to resize the gif image and save in a separate folders.

View Replies View Related

Image Resize

I need code that simply resize image with same ratio. My server has ASPImage 1.5 component.

View Replies View Related

Image Resize

How can i resize a picture with asp, i mean i store the picture into the database, and when i display it, i just resize it from html, but it does not look good, not focused... basically how can you make a thumbnail..?

View Replies View Related

Resize An Image On Upload

I need a pure ASP (no com, or dll objects) solution that not only allows me to upload an image, but also resize it.....

View Replies View Related

Image Resize In Browser

I have an ASP page where I am displaying an image submitted by a user. I don't know the width or height of the image - they are variable. However, when I display the image, I want to shrink it to a particular size if it is wider than one of my page elements (say, 130 pixels).

I need to detect the width of the image and then display it with a WIDTH attribute if it is wider than 130 pixels. Anyone know a way to do this with ASP, without using a 3rd party component? If not, know how to do it with Javascript?

View Replies View Related

Image Upload With Resize

I need help to do a upload image with image resizing (for the thumbnail view). our hosting provider supports file SoftArtisans upload component. How can I do the my task

View Replies View Related

Is Posible To Resize An Image Without Any Component

I am trying to resize images without componts in ASP, but I couldent find anything that can do that.

View Replies View Related

Help Me Save An Image File?

Can someone please (i dont even know where to start on this as i am completely incapable of file or image functions at the moment) help me do this:

i want to write a script that will copy an image from an internet page, then save it in a folder with the speficied filename. The url link is like this :
http://ipaddressort/BufferingImage?ImageAdr=123456.

The image is captured by the webcam, of course I can view it in the browser by typing the url, but I want to save it without any popup window or right click, I want to do it in the script.

View Replies View Related

Save An Image File

Is it possible for asp/scripts to create and save it in an image format(gif, jpg)? Say a script that creates an arrow picture.

View Replies View Related

Save Current ASP As An Image

Is there a way to save the client side opened asp page as a image file to the server side.That is take a screen shoot of the page and save it as a file preferrable html file or some image file and save it onto the server.

View Replies View Related

To Save ASP Rendered Table As An Image

I am trying to find a way to save/copy ASP/HTML generated tables on a webpage as images.
In other words, I want users to right click on a table and save it just like the way they would save an image.

Is there any way of programming this behavior without having the user ro download any software like ActiveX?

View Replies View Related

How To Save An Edited Image In The Database ?

I've problem on how to save an image file that has been edited into the database. Actually, i have to develop a webpage that can interact with the user where user can select an existing image in the database and customize the colour of the picture and also the background colour.

After editing the picture, i have problem to save the edited image in the database. For your info, we're using Flash MX 2004 to change the picture and background colour....

View Replies View Related

Save Remote Image To My Server

I would like to reference a remote image, such as http://www.mysite.com/pic.jpg and save it to a local folder such as c:pics . Can this be done with ASP? I have played with many image manipulation components and none of them perform this fuction.

View Replies View Related

Upload Image And Save Filename To Access Database

How do I upload images and save filename to Access database?

View Replies View Related

How To Resize All Images Sizes And Coordinates Of The Images On Resize Browser

My page have background image,on that image have more images and text. My problem is whenever resize browser that images are not resized and also not moved correct place .(i.e look not like before alignment).I want to do everything in dyanamic....

View Replies View Related

Prompt "Save As" Dialog For Image

I'm trying to force save as dialogue using this code in download.asp..but
when it runs it prompts for download.asp to save or open.

code snippet (from aspfaq.com)

Response.ContentType = "application/x-unknown" ' arbitrary
fn = "wallpaper_1_1.jpg"
Response.write "<br>" & Server.MapPath("wallpaper") & "<br>"
FPath = Server.MapPath("wallpaper") & fn
Response.AddHeader "Content-Disposition","attachment; filename=" & fn

Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(FPath)
Response.BinaryWrite adoStream.Read()
adoStream.Close
Set adoStream = Nothing

I want this page to prompt save image option, not page itself.

View Replies View Related

Resize A Frame

i have A page that show List of many field from database and i have frames : Top , Left and Main Page. I think it's tired to see the fiel with horizontal scrolliong too long. I wonder that the left frame can be resize to Left(Close to left) then i can open it again. But I have no idea to doing that.

View Replies View Related

Auto Resize Web Page

Has anyone developed a web page that automatically senses the screen resolution of the incoming browser and dynamically resizes content accordingly? For instance, an 800x600 resolution user might see 3 columns of product thumbnail images, whereas a 1024x768 user would see 4 columns. Of course, the thumbs are data-driven. Is this possible and/or advisable?

View Replies View Related

Picture Resize And Upload Using ASP

I have a web page which'll allow a user upload some pictures. Problem is, different users have different sizes of pictures. I was wondering if there was a way to resize the picture just before it is saved on the server? If not, then is there a way of resizing it just when i'm about to display it?

I googled around a bit but all i got were sites which had components that would help me do just that. I don't want to use components cos my host won't allow me use any external components, just want to use pure ASP (or maybe js).

View Replies View Related

Resize Photo Store On Server?

I have a Windows 2000 server. My ASP application allows users to upload a photo for display to other users. Unfortunately everyones photos are different sizes. I'd like to resize the photo to 150px wide while maintaining the aspect ratio of the photo.

Is there anything built into IIS/ASP that will allow me to do this? If not, is there a free DLL, etc. that I can add to the server?

View Replies View Related

PDF Creation :: Format The Text Or Resize It

Is anyone having problems with formatting text using the ASPPDF component? I am having problems when it fills in the pdf form from data entered through a form. For some reason it doesn't allow me to format the text or resize it...

View Replies View Related

Resize Popup Window To Fit Text

I have a popup window that is used to display text from a database. Some times it can be a few words, sometimes it can be a hundred words. What I would like to do is resize the popup window to fit the text. Well actually it is just the height that needs to be resized. I have set the width to 600. I have put the text in a table and I was thinking
I could set the height of the window to be the height of the table plus some for room. I don't know if that is possible.

At first I tried to count the number of lines and multiple by a factor by that doesn't work so nicely because I was getting the number of lines by dividing the number of charaters by the maximum number of characters in a line.

View Replies View Related

Resize Uploaded Images Without Server Component

My host offers the 'Persists ASP-Upload' component, but not the 'ASP-Jpeg' component. I can therefore allow users to upload images which can then be saved on the server.

What I need to do however, is resize their images before they are saved, so that their pixel dimensions are correct. Is there a way to do this without having the ASP-Jpeg (or similar) component installed on the server?

View Replies View Related

Auto Resize Dropdown List Of A Combo

Any code snippet or help link available on how to auto resize the dropdown list part of the combo(<select>) ?

Or, is there any alternative techniques for displaying the full lenth text when dropdown the combo?

View Replies View Related

Display An Image From Access, Stored As Location Name Not Actual Image.

I have a client who has had a ASP site with an Access database for several years. It stores information for the used cars on his lot. I have stored text in the database that points to the location of the image for each record. Each record will have a thumb image that is supposed to display in a list of vehicles available then the user can select an item from this list and a new page displays with the information and the regular size image. So far everything has worked fine exept for the display of the images which are stored in a separate directory called veh-photos. All I get are image place holders. I am using Dreamweaver 2004 and and Access 2000 for the database.

Following is the code to list vehicles: ....

View Replies View Related

Open Image In 'Kodak Image Edit Control' With Web Browser

1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page.

2.This '.tif' type image can be shown better with 'Kodak Image Control'.

3.To have this 'Kodak Image Control' on my code page I just add it's ..ocx to tool box and then drag it from 'Toolbox' to the page.

4.Now after dropping this control to the code it's type is getting changed to 'object' instead of type 'ImgEdit'(and I think this is the
reason I don't get correct result).

5.On one button's 'Onclick' event I'm calling a javascript function with which I'm setting a 'Path'and'Display' property of a control.

6.And want to show a image at location -- '..MFTDRCMF919685173-62.tif' which get shown in new browser window but could not get shown in that particular control. That means the path is correct, then what is the problem?

For better understanding of problem I'm pasting a following code which I've tried up till now......
..................................................
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

<SCRIPT LANGUAGE=javascript>
<!--
function showpic()
{
var path;
path = document.frmtif.path.value;
alert(path);
document.frmtif.ImgEdit1.Image =path;
document.frmtif.ImgEdit1.Display;
window.parent.self.open(path);
}

//-->
</script>

</HEAD>
<BODY bgColor=#ffe4e1>
<form name="frmtif">
The Image
<P>
<OBJECT id=ImgEdit1 style="WIDTH: 409px; HEIGHT: 218px" type="ImgEdit"
align=left
border=1 classid=clsid:6D940280-9F11-11CE-83FD-02608C3EC08A
name=imgtif></OBJECT>

<input type="hidden" name="path"
value="..MFTDRCMF919685173-62.tif">
<input type="button" name="show" value="Show" onclick="showpic();">
</P>

</form>
</BODY>
</HTML>

..................................................

View Replies View Related

Displaying Alternate Image When Image Source Not Found

I am creating a dynamic ASP VBScript page, which gets data from an Access database.

In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database.

I think what I am trying to get to is the following:

If file exists (using URL from database to get location of image file) then
display image using the url from the database as the image source
else
display default image - hardcoded in program
endif

I have had a go and come up with the attached but I get an error with my if statement...

View Replies View Related

Image From Image Folder Into Byte Array?

I can convert an image that is retrieved from a FileUpload object into a byte array and insert it into the database..

When the user signs-up i wish tosimply insert into the Picture (DB Type = Image) field to an image i already have saved in my images folder?

Anyone know of a way to do this? Tutorials, articles or advise??!

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved