tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Freitag" ...@cfdev.com>
Subject RE: image resize
Date Tue, 31 Jul 2001 16:18:33 GMT
Resizing with the IMG tag does work for slight scaling. In the case where
you are generating thumbnails, you would still be downloading the full sized
image, and would defeat the purpose of having thumbnails.

I've been working on a server side solution for this also, but have run into
a couple of problems, the main problem is the reading an image in from a
file.  I've been using:

Image img = Toolkit.getDefaultToolkit().createImage("img.jpg");
or
Image img = Toolkit.getDefaultToolkit().getImage("img.jpg");

but it hangs.

I've narrowed it down to Toolkit.getDefaultToolkit() hanging, and I haven't
been able to find another way to do it. It works fine, but I can't get it to
terminate without killing the JVM, or calling a System.exit(0); I'm running
Windows 2000 with JDK 1.3


________________________________________
Pete Freitag (pfreitag@cfdev.com)
CFDEV.COM
WEB Developers Resources
http://www.cfdev.com/

-----Original Message-----
From: William Kaufman [mailto:WKaufman@viquity.com]
Sent: Tuesday, July 31, 2001 11:50 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: RE: image resize


There's also the possibility of letting the browser resize it for you, by
setting the width and height attributes of the <IMG> tag.  Browsers don't
scale images well, but it's a whole lot easier than doing it yourself.

(Also note that AWT can't run on Unix without an X server, nor can it run if
the server is locked.  Look through the Tomcat archives for more
information.)

                                        -- Bill K.

> -----Original Message-----
> From: Cory Powers [mailto:cpowers@appriss.com]
> Sent: Tuesday, July 31, 2001 8:21 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: image resize
>
>
> I'm not sure, but there is good info on working with images
> on the jguru
> site. Try http://www.jguru.com/faq/home.jsp?topic=Media
>
>
> -----Original Message-----
> From: Reynir Hübner [mailto:Reynir@hugsmidjan.is]
> Sent: Tuesday, July 31, 2001 11:13 AM
> To: tomcat-user@jakarta.apache.org
> Subject: image resize
>
>
> Hi,
> this is probably a bit of topic...
> What would be the best way to resize images with servlet ?
> I have .jpgs and .gifs in files (not kept in database) and I need to
> create new files in different sizes from those images.
> Is anyone willing to give me a hint (or more :) on how to do it.
>
> thanx
> -r
>


Mime
View raw message