Page 1 of 1

Repair jpg?

Posted: 2010-04-20T04:08:12-07:00
by Albireo
Hello!
Have problems with some images converted with ImageMagick.
I have used the following code

Code: Select all

convert -define jpeg:size=120x120 hatching_orig.jpg  -thumbnail 120x120^ \
          -gravity center -extent 120x120  cut_to_fit.gif
All created images can be opened with (for example) IrfanView.
(But don't always work with AutoHotkey GUI)
I've also encountered problems opening some images with Joomla (on the web)

If I open the image with IrfanView and save it back to jpg it works
The original image is 24kB and the new image is 1,82kB.
(I can open it with AutoHotkey GUI)

I have tried the same with ImageMagick.

Code: Select all

convert infile.jpg outfile.jpg
But nothing happen with the image.... (What happens when you save with IrfanView?)

If I use "-define jpeg:size=240x240" like this

Code: Select all

convert -define jpeg:size=240x240 hatching_orig.jpg  -thumbnail 120x120^ \
          -gravity center -extent 120x120  cut_to_fit.gif
I got another result image (but I can't see the differens).

Is my only solution is to use Irfanview to solve this?

(If I create an png image it works)

//Jan

Re: Repair jpg?

Posted: 2010-04-20T09:13:55-07:00
by fmw42
what version of IM are you using? perhaps you need to upgrade if you have an old version. If you are on windows, then the ^ symbol needs to be escaped properly. see http://www.imagemagick.org/Usage/windows/

Re: Repair jpg?

Posted: 2010-04-20T11:16:55-07:00
by Albireo
I'm using 6.5.8-7 2009-12-17 q16
When I look at the image it seems to be what I wanted.

(I think the conversion is correct)

//Jan

Re: Repair jpg?

Posted: 2010-04-20T11:23:40-07:00
by fmw42
maybe you need to reinstall/upgrade your libjpeg