I have a single band, 16 bit J2K file that I am trying to convert to 8 bit
JPG.  When the image is small it works fine but when it gets big it runs
almost forever.
The small file runs in about 10 seconds. I killed the big file after 3
hours. I might try letting it run overnight in a few days but even 2 hours
is too long for my time line.
My original test image that works well is 1093 rows by 6144 columns. The
image that runs forever is 40346 rows by 6144 columns. 
 
What I would like to do is:
    convert infile.jp2 -resize 768 -normalize outfile.jpg   and
    convert infile.jp2 -normalize outfile.jpg
When I get this one working then I will need to be able to do the same with
a 16 bit, 3 band image, 50K rows by 6144 columns. 

I have tried 
    convert infile.jp2 outfile.jpg
and
    convert infile.jp2 -resize 768 outfile.jpg
thinking that just the simple conversion or the resize might make it run
faster.
 
My system is running Window XP with a 3Gh CPU, 2GB of RAM (4 GB of virtual
RAM) and a fast disk.
 
What I have noticed while it runs is first it takes a lot of CPU but after a
few minutes it drops to 2% or 3% then the I/O goes up and up. And at some
point my machine used up 3GB of memory but it didn't stay there.  
After 45 minutes the Task Manager showed the I/O count was 4.5GB read, 3.5GB
written and 57 MB other I/O (I don't know what other is?). It had 502K page
faults. The CPU usage was only 3 minutes.
After 90 minutes it showed 5.6 GB read, 3.6 GB written and 148 MB of other
I/O. CPU was 5 minutes.
 
The other thing I noticed was the temp files IM was using. Every time I run
no matter the options. convert has 3 temp files. 
 magick-xcwkPBUk        302,595 KB
 magick-ANPNQ5yF        37,823 KB
 magick-vjunjl_R        2,420,760 KB
 
I don't understand why it needs a 2.4GB file. The uncompressed data is only
495MB:  40346(r) x 6144(c) x 2(bytes) = 495,771,648

I'm wondering if the slow down is in the Jasper code. I might be able to
write the file as a 16 bit PNG if that would speed it up?
 
 
Larry 

_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to