Page 1 of 1

problem with batch jpg convert

Posted: 2009-05-31T08:54:26-07:00
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

Re: problem with batch jpg convert

Posted: 2009-05-31T09:01:52-07:00
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

Re: problem with batch jpg convert

Posted: 2009-05-31T09:16:36-07:00
by revmarkp
Absolutely spot on. THANKS so much. A response in less than 10 mins! :D