problem with batch jpg convert

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
revmarkp

problem with batch jpg convert

Post by revmarkp »

Sorry if this is an old chestnut (I did search the forums though):

Here is a folder of JPGs:

Code: Select all

markp@markp-laptop:~/Desktop/air stack$ ls
P1040036.JPG  P1040039.JPG  P1040042.JPG
P1040037.JPG  P1040040.JPG  P1040038.JPG  
P1040041.JPG  P1040043.JPG
When I do this:

Code: Select all

markp@markp-laptop:~/Desktop/air stack$ convert -resize '800x600' -quality 50 *.JPG
All the above files convert fine EXCEPT the last one, and I get this message:

Code: Select all

convert: missing an image filename `P1040043.JPG' @ wand/convert.c/ConvertImageCommand/2710.
an explicit convert of that filename gives the same message. But if I rename that file, or mogrify it instead it behaves as I would expect. If it's any clue the batch of JPGs get renamed with the sequential additional number using the name of the problem file. ie:

Code: Select all

markp@markp-laptop:~/Desktop/air stack$ ls
P1040036.JPG    
P1040037.JPG  
P1040038.JPG
P1040039.JPG
P1040040.JPG
P1040041.JPG
P1040042.JPG
P1040043.JPG
P1040043-0.JPG
P1040043-1.JPG
P1040043-2.JPG
P1040043-3.JPG
P1040043-4.JPG
P1040043-5.JPG
P1040043-6.JPG
OS - Ubuntu 9.04; IM - 7:6.4.5.4.dfsg1-1ubuntu3; Ghostscript - 8.64.dfsg.1-0ubuntu8

Thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with batch jpg convert

Post by magick »

Not a bug. Its a usage problem. The convert program requires a destination image file whereas mogriy does not:
  • convert -resize '800x600' -quality 50 *.JPG image.gif
revmarkp

Re: problem with batch jpg convert

Post by revmarkp »

Absolutely spot on. THANKS so much. A response in less than 10 mins! :D
Post Reply