Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 24191, ImageUtil

by Jun Inamori Email: Anonymous

ImageUtil is the Java API to scale down JPEG, PNG, GIF and WBMP images by JAI (Java Advanced Imaging API).
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For JBuilder, Version 12.0  to 13.0 64 downloads
Copyright: All rights reserved

Size: 122,665 bytes
Updated on Mon, 30 Oct 2006 11:17:08 GMT
Originally uploaded on Mon, 30 Oct 2006 11:17:08 GMT
SHA1 Hash: B254E93BA2B741535A13FD4ABE844AFCFD0B854F
MD5 Hash: DFCF191A8DD979CDF3AC121BEAA3785B

    Explore the files in this upload

When the image file is uploaded to your Servlet, its binary contents will be available in JPEG, PNG or GIF format. To manipulate the uploaded image file, those binary contents should be converted to a BufferedImage object. After your Servlet finishes to work on a BufferedImage object, it should be serialized back into the binary contents in JPEG, PNG, GIF or WBMP format to be send back to the web browser or to be stored into the SQL table. ImageUtil implements methods for converting the binary contents in typical image formats to/from a BufferedImage object.

Java Image I/O API was introduced in JDK 1.4 . And you can use:
* javax.imageio.ImageIO
to obtain an ImageReader object for the specific image format.
ImageReader object reads the binary contents from the image file, and returns the BufferedImage object. But, ImageReader for GIF has a bug and throws:
* Get IIOException: Unexpected block type 0! on GIF file
when it reads some GIF files.
Even in case of such a GIF file, ImageUtil can read and return a BufferedImage object. So, this API will be the good workaround for the bug in JDK.

For more information, see

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04