user2650277 user2650277 - 2 months ago 32
Bash Question

Overwrite original image after conversion

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

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
, i need to convert it to a jpg while still keeping name/path as


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