Page 1 of 1

Problems with resize and optimize image

Posted: 2016-03-17T22:06:14-07:00
by vianna_lsv
Hello

I search in forum a similar problem but I did not find

Could anybody help my.

The pronlem is :

I am trying execute the command:

convert -limit foto/f.jpg -debug exception -filter Triangle -define filter:support=2 -thumbnail 600 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB xuxu2.jpg

When I am executing the command, the command is executing in a long time and did not create a new image.

But When I change the similar code only changing the code of size output "... -thumbnail 500 ... " the code is executed fast and the image (thumb) is created.

I tryed include the code to reduce memory " -limit memory 0 -limit map 0" but the problem is the same.

I tryed also add more memory ".....-limit memory 9999999999 -limit map 999999999 ..." but I have the same problem

sugestions ?

Thasks So Much and good day for all

Re: Problems with resize and optimize image

Posted: 2016-03-17T22:24:44-07:00
by fmw42
-limit has to do with resources not images. So you need to set the type and value. See http://www.imagemagick.org/script/comma ... .php#limit

Please always provide your IM version and platform, since syntax may differ.

Best way to debug is to break your commands down into individual separate commands and look at the outputs to be sure each step is working. Then once they all work, combine them together.

Or

Put is +write tmpN.png at each step N and be sure those images look correct all along your processing command.

Re: Problems with resize and optimize image

Posted: 2016-03-31T22:52:45-07:00
by vianna_lsv
Hello;

Thanks so much for your attention.

My IM version is 6.7.2-7 2015-07-23 Q16.

I did the division the command with you suggested and I found the command that generates the problem.

The command is "-posterize 136", if I reduce the value to 100 or less the command is executed without problem and in little seconds, but there is a loss in the color quality.

When I set a value 101 or more the program can't finish the processing, I waited more than 10 minutes and dont respond. I need kill the process.

I searched about the problem in forum but I dont found exactly the problem.

Please, Could you help me more one time? Do you have some idea about the solution?

Thanks

Re: Problems with resize and optimize image

Posted: 2016-04-01T02:47:37-07:00
by snibgo
Why are you posterizing at all? If you remove that, what happens?

Re: Problems with resize and optimize image

Posted: 2016-04-04T10:28:30-07:00
by vianna_lsv
Hello;

When I dont use this command, the process is running normaly. But there is a loss in the color quality in image. How my objetive is execute the code to resize and optimization with less loss, and this is broken my objetive :(

I try implement the code for resizing and optimization using the code base of Dave Newton https://www.smashingmagazine.com/2015/0 ... agemagick/

I cant execute complete code run yet.

Re: Problems with resize and optimize image

Posted: 2016-04-04T11:01:07-07:00
by snibgo
After removing "-limit", your command works fine for me on IM v6.9.2-5 on Windows 8.1.
vianna_lsv wrote:My IM version is 6.7.2-7
That is very old. I suggest you upgrade.

If that doesn't help, I suggest you upload a source image file that we can test with.