Repair jpg?

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
Albireo
Posts: 68
Joined: 2010-01-12T03:32:23-07:00
Authentication code: 8675309

Repair jpg?

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Repair jpg?

Post 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/
Albireo
Posts: 68
Joined: 2010-01-12T03:32:23-07:00
Authentication code: 8675309

Re: Repair jpg?

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Repair jpg?

Post by fmw42 »

maybe you need to reinstall/upgrade your libjpeg
Post Reply