big image failed to convert

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sireeshala
Posts: 38
Joined: 2013-09-27T04:00:05-07:00
Authentication code: 6789

big image failed to convert

Post by sireeshala »

Hi,
I am trying to re size the image from 96 DPI to 300 DPI but the conversion is not happening for even long time.
till 180 DPI conversion its worked fine after 180 till 200 i got complete dark image .
Can i know the reason why its taking too long time to convert it to 300 DPI ?

Command line i am using for conversion "convert.exe cardc.jpg -resize 7968x10968 -density 300x300 -quality 50 -compress Group4 -type Bilevel rescale.tiff"

The image with which i am able to reproduce the issue is at https://www.dropbox.com/s/1bqj2qdmuhrm1ok/cardc.jpg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: big image failed to convert

Post by snibgo »

If you remove the options and add then in one by one, you will see that "-density" takes no time at all. The slow process is the compression.

Group 4 compression is already bilevel. Don't also specify "-type bilevel".
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: big image failed to convert

Post by dlemstra »

The compression is not really the slow part but it is causing it. The slow part is making the image monochrome (color quantization).
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: big image failed to convert

Post by snibgo »

Thanks for the correction. "-compress Group4" is slow, but the time is taken by the quantization, not the compression.

EDIT to add:

convert cardc.jpg -resize 7968x10968 -density 300x300 -compress Group4 c.tif
Seconds: 36.69

convert cardc.jpg -resize 7968x10968 -density 300x300 -auto-level -threshold 50% -compress Group4 c2.tif
Seconds: 5.42
snibgo's IM pages: im.snibgo.com
Post Reply