I have written an application using ImageIO to read a JPEG image from a file. I have obtained the supported destination image types from the reader by calling JPEGImageReader.getImageTypes() and there were 3 image types. out of the three, I have set the destination of the ImageReadParam to the third image type specifier which is of buff image type TYPE_CUSTOM. The image has been successfully read using the reader. But when I tried to render the buffered image returned by the reader, it took very long time to render and the time taken in Mantis and Tiger are abnormally high. This is seen on Solaris as well as Windows. Whenever I resize the frame, the CPU utilization shoots up to 100% on Win32 platforms and other applications freeze until this image is rendered.
I have given the statistics below:
Win32 (Win XP):
---------------
1.5.0 - b06 - 20603 ms
1.5.0 - PIT - 21453 ms
1.4.2 - b27 - 20187 ms
1.4.0 - b92 - 3844 ms
1.4.1 - b21 - 3812 ms
Solaris 8
---------
1.5.0 - b06 - 109527 ms
1.5.0 - PIT - 110750 ms
1.4.2 - b27 - 103142 ms
1.4.1 - b21 - 22019 ms
1.4.0 - b92 - 22110 ms
From the above data, you can very well notice that the time taken in mantis and tiger are abnormally high. I have also tested on Win NT in addition to the above platforms and I am able to reproduce this.
I have attached a sample code. Execute the sample code and watch the console. It will print out the time taken for rendering the buffered image. Compare the value with the above data. If they match approx, then the bug is reproduced.