Page 2 of 2
Re: Convert sometimes very slow with creating histogram
Posted: 2010-05-29T01:55:00-07:00
by bartgrefte
fmw42 wrote:How big are your files? Can you post a link to an example of one of them?
What is your IM version and platform? How but there aren't troublemakers in there.
Uhm.... I use convert from the portable version of Image Magick, where convert is about 5.1MB in size, version 6.6.something, have to check that when I'm back at work. Why portable? Because that version of convert can run without Image Magick installed, only needed 2 dll's placed in the folder where convert is.
snibgo wrote:LG_gas+hoge+druk_Enexis_0000546670_09G267447.png has 58 colors.
58 is still small, no problem. You may find the troublemakers have many more.
My suggestion, in my first post, will only make a difference for large numbers of colors.
If a troublemaker has a small number of colors, you might:
identify in.png -verbose >in.txt
and post that imformation here (if you feel able).
If the troublemakers had more colors than that, I would have noticed that and I had to reject the pictures. The only thing that was different (from what I remember) was that there where more IDAT chunks, not sure if that matters.
Hmm, okay.
Gonna run that command as soon as I'm back at work, next Tuesday. Let you know what it output's.
Re: Convert sometimes very slow with creating histogram
Posted: 2010-05-29T16:48:07-07:00
by fmw42
FYI regarding the 1024 bin histogram limit:
Currently, -verbose info will not display a histogram unless the number of unique colors is 1024 or less; whereas histogram:info: will display the histogram with the number of lines (bins) equal to the number of unique colors. This was the 1024 bin limit I was remembering. But apparently it has never limited the histogram output itself.
Note below, the recent addition of the -unique setting for identify
If I do:
identify -verbose rose:
there is no histogram.
If I do:
identify -unique -verbose rose:
there is still no histogram, but there is now an entry for
Colors: 3019
If I do:
identify -verbose logo:
then I get a histogram
and
identify -unique -verbose logo:
then I get a histogram and
Colors: 232
Re: Convert sometimes very slow with creating histogram
Posted: 2010-05-31T23:29:48-07:00
by bartgrefte
snibgo wrote:But I've never run into a PNG with more than 5 colors.
LG_gas+hoge+druk_Enexis_0000546670_09G267447.png has 58 colors.
58 is still small, no problem. You may find the troublemakers have many more.
My suggestion, in my first post, will only make a difference for large numbers of colors.
If a troublemaker has a small number of colors, you might:
identify in.png -verbose >in.txt
and post that imformation here (if you feel able).
Found a troublemaker, that command gives:
PNG 6874x6888 6874x6888+0+0 8-bit DirectClass 350KB 0.719u 0:00.718
This is the output from a picture that convert processes at normal speed:
PNG 5222x4648 5222x4648+0+0 8-bit DirectClass 9.92KB 0.391u 0:00.391
I compared them with tweakpng.
- The troublemaker has 11 IDAT chunks, the other only 1...
- They both have only 2 used colors, even though the troublemaker has 4 in the PLTE chunk.