user2650277
user2650277

Reputation: 6739

Overwrite original image after conversion

I am using the following command to convert a tiff to a jpg.It works fine but it creates lena512color.jpg as expected.

gm mogrify -format jpg lena512color.tiff

I want to know what command shoul;d i use to overwrite the existing file.For e.g suppose i have a tiff named /tmp/0303393 , i need to convert it to a jpg while still keeping name/path as /tmp/0303393

Upvotes: 1

Views: 868

Answers (2)

I'd simply rename and move it. With respect to the filetype. No overwriting!

Regards,

Upvotes: 0

Mark Setchell
Mark Setchell

Reputation: 207465

I don't think you can do that with mogrify, you probably need convert, but either way the syntax is like this when extensions are omitted or don't correspond to formats:

gm convert TIF:/tmp/0303393 JPEG:/tmp/0303393

Upvotes: 2

Related Questions