Skip to main content

zooming images, how?

1 reply [Last post]
ndario
Offline
Joined: 2003-07-14

hello everybody,

i need some help and advices on jpg imaging. i have a collection of large jpgs (4000px, 24bit) and i need to serve them to clients. in fact i need to serve arbitrary sized thumbnails and also provide zooming and panning.

as far as i know, in order to work with jpegs, i need to decompress entire image into memeory to be able to scale and crop it. am i wrong here? is there any better solutions?

scaling and cropping are two basic operations i need to perform. is there anything i can do to read only part of the jpg image from disk and scale it? what about tiling? i see there is tilecodec package in jai. can i create tiled jpeg? maybe tiled tiffs (if converting doesn't take too much time)?

any advice will be highly appreciated!

thank you

dario

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Brian Burkhalter

On Fri, 4 Nov 2005, jai-interest@javadesktop.org wrote:

> hello everybody,
>
> i need some help and advices on jpg imaging. i have a collection of large jpgs (4000px, 24bit) and i need to serve them to clients. in fact i need to serve arbitrary sized thumbnails and also provide zooming and panning.
>
> as far as i know, in order to work with jpegs, i need to decompress entire image into memeory to be able to scale and crop it. am i wrong here? is there any better solutions?

You are not wrong: you would need to decompress the whole thing. The only time
you might be in luck is if the JPEG happened to contain a thumbnail image of
the right size, for example in the JFIF extension marker segments.

> scaling and cropping are two basic operations i need to perform. is there anything i can do to read only part of the jpg image from disk and scale it? what about tiling? i see there is tilecodec package in jai. can i create tiled jpeg? maybe tiled tiffs (if converting doesn't take too much time)?

You pretty much need to decompress the lot. You could of course convert it
into a tiled TIFF or JPEG 2000 image for later use. If you convert to a tiled
output using lossy compression of course you will lose data.

Brian

----------------
Brian Burkhalter
Java Multimedia, Imaging, and Graphics
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net