Page 1 of 1

Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-10-23T00:04:51-07:00
by sireeshala
At image.type(BilevelType) Not responding because of the recursion.
if i have changed the parameters resize or density or any thing else its working fine.

For the following image
https://www.dropbox.com/s/3g3baikbnvomd5k/rescale.jpg

Code: Select all

string sResultSinglePage( "rescale.jpg");
Geometry gNewDensity(300,300);
	Image image;
	image.read( sResultSinglePage.c_str() );
	image.resize("7968x10968");
        image.density(gNewDensity);
        image.quality(g_nJpegQuality);
        image.magick("TIFF");
        image.compressType(Group4Compression);
        image.type(BilevelType);
        image.write("rescale.tiff");
Thanks in advance

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-10-23T02:17:32-07:00
by dlemstra
Can you please post your IM version and platform?

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-10-23T21:01:28-07:00
by sireeshala
On windows 7 64 bit and Im Version is 6.8.7

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-10-25T02:08:55-07:00
by sireeshala
if I tried to avoid the function (commented out) image.type function
image.write function is also not responding for 15 to 18 mins and given a complete black image.

is this a bug or is there any problem with the image properties?
Even i am able to reproduce this on 6.8.2

Thanks in advance,

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-10-26T04:47:31-07:00
by dlemstra
The problem probably the amount of pixels in your image. At some point ImageMagick will use your disk to store its pixels and reading/writing that is really slow. Maybe you can switch your application to 64 bit? This will allow you to allocate more memory at once.

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-10-28T23:14:14-07:00
by sireeshala
application has some dependencies so we cant switch it over 64 bit.
Mentioned that "probably the amount of pixels in image". are there any specified limits ?
Can we get some other solution to this problem?

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-10-29T11:01:29-07:00
by dlemstra
You can increase the memory limit with Image::cacheThreshold(bytes). The documentation says megabytes but it really is bytes, I already patched this comment in the svn repository. You can read more about memory limits on windows here: http://msdn.microsoft.com/en-us/library/aa366778.aspx.

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-11-11T02:13:48-07:00
by sireeshala
There is no use by setting this value is there any other alternative ?

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-11-11T03:07:14-07:00
by dlemstra
sireeshala wrote:There is no use by setting this value
Setting this value did not help?

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-11-11T03:52:30-07:00
by sireeshala
i have tried to set with some values like 100000 .... it did nt worked out
Can you suggest any exact value which fixes this problem

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-11-11T04:16:28-07:00
by dlemstra
I cannot suggest a value that fixes the problem. You could try the maximum value: 4294967295

Re: Not responding when Convert Jpg(800Kb) to Tiff

Posted: 2013-11-18T23:25:35-07:00
by sireeshala
Setting the memory limit to any value does nt worked out .
Still the convert.exe in not responding for longer time.

Is it possible to throw any error if its unbale to convert in a specified time limit.