Re: Creating image thumbnails is slow on Mac platform, suggestions for improvement?



On Sat, 26 Jan 2008 06:53:38 -0600, Bill <bill@xxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :

My java application is given a list of image files. For each image, it
creates an image thumbnail and displays this thumbnail in a separate
JFrame. The creation of these thumbnails is very slow compared to the
Mac Preview application. Is there a way to speed this up?

Consider looking for a fast app, possibly not written in Java that has
batch facilities to convert images. Then use the exec feature to
control it.

See http://mindprod.com/jgloss/exec.html

The hard way to do it is to study up on the format of the files you
are thumbnailing, then see if you can come up with a fast algorithm to
shrink them and write it in assembler and hook to it with JNI. This
might be feasible if the shrinking is always a power of two. A power
of two algorithm would be faster than a generic one. Each pixel is a
weighted average of a set of surrounding pixels. Use shift for your
divide.

See http://mindprod.com/jgloss/jni.html
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
.