Re: gm mogrify -format foo preserves original?

Glenn Randers-Pehrson <[email protected]> Mon, 10 Oct 2005 09:34:48 -0400
Newsgroups gmane.comp.video.graphicsmagick.tools
Message-ID <[email protected]>
At 03:55 PM 10/8/2005 -0500, Bob Friesenhahn wrote:
>The mogrify command currently preserves the original file if
>'-format foo' is used to change the format of the file.  When the 
>utility completes, there could be just one file (requested format is 
>the same as the original) or two files (requested format differs).
>
>This approach differs from other mogrify operations which always alter 
>the input file.  Logically, it seems that '-format foo' should remove 
>the original input file after a successful format conversion.  The 
>current behavior is a bit odd, but if it is changed, it may cause 
>problems for users since it is a change and they could lose files
>
>Current operation:
>
>% ls
>crap.jpg save.jpeg
>% gm mogrify -format jpeg *.*
>% ls
>crap.jpeg crap.jpg save.jpeg
>
>Ideas? Comments?


I think the current behavior is OK.  It may be a little surprising
when the input is jpeg and the output is jpg, but on the other hand
if the input was png and the output was jpg I wouldn't expect the
png to disappear.

Glenn


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl