Problem converting 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
hexmode
Posts: 13
Joined: 2012-03-30T13:01:12-07:00
Authentication code: 8675308

Problem converting JPG

Post by hexmode »

I'm running into a weird error with this image: http://php.med.unsw.edu.au/cellbiology/ ... ing_03.jpg

Running display shows the image. Identify doesn't show anything weird, but convert refuses to convert anything:

$ convert --version
Version: ImageMagick 6.7.7-10 2012-11-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

$ convert -scale 50x50 Nuclear_reprogramming_03.jpg
convert.im6: no images defined `Nuclear_reprogramming_03.jpg' @ error/convert.c/ConvertImageCommand/3044.

(The version I'm using is from http://packages.debian.org/wheezy/imagemagick, so I can report this there if it is a problem that has been fixed already.)
hexmode
Posts: 13
Joined: 2012-03-30T13:01:12-07:00
Authentication code: 8675308

Re: Problem converting JPG

Post by hexmode »

Original user with the problem is here: https://www.mediawiki.org/wiki/Thread:P ... 2_problems
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Problem converting JPG

Post by glennrp »

You need to specify the destination file for convert, e.g,,

Code: Select all

convert -scale 50x50 Nuclear_reprogramming_03.jpg Nuclear_reprogramming_03_converted.jpg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem converting JPG

Post by snibgo »

Code: Select all

$ convert -scale 50x50 Nuclear_reprogramming_03.jpg
"convert" needs an output filename.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem converting JPG

Post by fmw42 »

correct IM 6 syntax is

convert input -scale WxH output

It is not a good idea to do the scale before your input image
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Problem converting JPG

Post by glennrp »

It is not a good idea to do the scale before your input image
Agreed. I should have suggested

Code: Select all

convert  Nuclear_reprogramming_03.jpg -scale 50x50 Nuclear_reprogramming_03_scaled.jpg
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem converting JPG

Post by anthony »

IMv7 will complain that scale has no image
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply