Page 1 of 1

Forcing imagemaigc to overwrite image

Posted: 2010-03-14T10:10:15-07:00
by ziasumo
I want that ImageMagick should overwrite a new iamge when create without creating
imagename-0, imagename-1 ... etc
when I exeecute that command
convert old_image new_image;
new_image should create with same name no -0 prefixes..
Anyone can have any tip for this...

Thanks

Re: Forcing imagemaigc to overwrite image

Posted: 2010-03-14T10:34:25-07:00
by snibgo
It will overwrite old images. It creates imagename-0 etc when you don't fully specify "crop" or whatever.

Show us the exact command you are using.

Re: Forcing imagemaigc to overwrite image

Posted: 2010-03-18T05:52:17-07:00
by ziasumo
This is the orignal command I am using ..I sit some psd property or what...
convert 123.psd output.jpg
ite creates
ouput-0.jpg
output-1.jpg
Even I am execting that command directly in shell command prompt.
What could be wrong..?

Re: Forcing imagemaigc to overwrite image

Posted: 2010-03-18T06:11:58-07:00
by magick
Your image has a layer and since JPEG can only contain 1 image, ImageMagick generates 2 with unique names. If you are not interested in the layer, try this command:
  • convert '123.psd[0]' output.jpg

Re: Forcing imagemaigc to overwrite image

Posted: 2010-03-22T05:32:06-07:00
by ziasumo
Thanks for the suggestion...
It works good.
Actually I was unfamiliar with PSD format.
So it wasted my 1 hour in search of why ImageMagic creates two images with out-o.jpg and out-1.jpg from a psd file.

Thank you very much for your kind help.