aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Image scaling/encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Image scaling/encoding " Watch "Image scaling/encoding " New topic
Author

Image scaling/encoding

Tonny Tssagovic
Ranch Hand

Joined: Dec 30, 2003
Posts: 226
Hi ranchers,
Well, I need to change the scale/encoding of an image, so I wanted to ask you guys what is the best way to do that..
I have checked the j2se api for more then 2 hours, and I will not spend a minute extra.. The idea that I have from the api so far is to use
different image readers writers,(that inherit from javax.imageio.ImageReader )which have a read function that returns a
java.awt.image.BufferedImage object and the
javax.imageio.ImageReadParam which has the parameters of an image like width / height and could be passed to the different read functions of these Imager resders as a parameter.
So if I have a byte that contains a gif image and I want to transfrom that image to a smaller png image, I will set the desired dimention of the javax.imageio.ImageReadParam that I will pass to the pngreader, so when I read from it I will get a BufferedImage with the desired diemnntion..
Well sorry about this messy message, but I hope you will get it if you used image IO before..
My questions are: I think it could be done this way, but is it the right way (THE BEST wa) ? what is the best way to change the sacle and the encoding of an image without using any 3.rd party API (unless it is free and I don't have to make my source available) and the one that will work with all the 1.4+ JREs.? I have seen Java Advanced Imaging at sun's site, there is no need for it right? and it is not part of the standard JRE, right? The software will reside in a server, and it would be cool if it is quite fast, since it will probably have many users.. and should not use an API that I can not bundle in my application..
THANK YOU VERY much .. any help will be apriciated.
PS: It does not need to be hiper cool, and I have max 6 hours to make it work and test it, so please do not refer to some complex APIs, or image processing stuff. Awaiting your reply!
 
Consider Paul's rocket mass heater.
 
subject: Image scaling/encoding
 
Similar Threads
How I got 94% in the SCJP exam...
reading from the end of file
How get full Stream of document into other InputStream?
color detection with mouse
multilingual JSP/Servlets