How to stop mogrify -format from making new images?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
acoustic7
Posts: 14
Joined: 2013-08-06T14:32:05-07:00
Authentication code: 6789

How to stop mogrify -format from making new images?

Post by acoustic7 »

Hello all, I have a simple question.

I'm using the command:

Code: Select all

mogrify -format pgm *.png
to convert a folder of pngs to pgms. While I understand why it does it, morgify just makes a new image in the different format. I have a bunch of images and don't want to keep doubling the size of the directory. Is there a way to make mogrify just replace the image? If not, is there a way to delete all of a type of image (i.e. png) once i'm done mogrifying it all?

Thanks!!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to stop mogrify -format from making new images?

Post by fmw42 »

It just so happens that this question was answered (two days ago) about 10 posts below yours. see viewtopic.php?f=1&t=23980 and the ephemeral: option. http://www.imagemagick.org/Usage/files/#ephemeral
acoustic7
Posts: 14
Joined: 2013-08-06T14:32:05-07:00
Authentication code: 6789

Re: How to stop mogrify -format from making new images?

Post by acoustic7 »

Ahh! Wouldya look at that! Thanks so much! I apologize for not taking the time to dig deeper and see if the question had already been answered. Poor forum etiquette of me, but thank you so much!
Post Reply