Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using .gif with AspJpeg

Status
Not open for further replies.

finkelman

Programmer
Mar 17, 2002
5
0
0
US
Hi,

I am using the AspJpeg component to resize my images. When I use .jpg images it works perfectly, but when I use a .gif image, I get a broken image.

I call the image using:

<IMG SRC=&quot;resize.asp?path=d:\mysite.com\html\home_logo.jpg&width=100&quot;>

Here is the resize.asp page:

<%
Set jpeg = Server.CreateObject(&quot;Persits.Jpeg&quot;)

jpeg.Open( Request(&quot;path&quot;) )

' Set new width
jpeg.Width = Request(&quot;width&quot;)

' Set new height, preserve original width/height ratio
jpeg.Height = _
jpeg.OriginalHeight * jpeg.Width / jpeg.OriginalWidth

' Send thumbnail data to client browser
jpeg.SendBinary
%>


Can anyone who has experience with this script please tell me if they have any idea why this is happenning.

Thanks
 
Am I the only one around here who is suspicious that a problem has arisen on a Jpeg manipulation script when trying it with a different image format? I think not!

Does the final source code point to a jpeg instead of a gif by any chance? I bet it's the right size though. Derren
[Mediocre talent - spread really thin]
 
I have 2 images in the directory, home_logo.jpg and image.gif.

When I call the .jpg using:

<IMG SRC=&quot;resize.asp?path=d:\mysite.com\html\home_logo.jpg&width=100&quot;>

It works.

When I call the .gif using:

<IMG SRC=&quot;resize.asp?path=d:\mysite.com\html\image.gif&width=100&quot;>

It doesn't work.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top