Clear image setting history

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
Marcel71
Posts: 49
Joined: 2011-04-13T13:57:34-07:00
Authentication code: 8675308

Clear image setting history

Post by Marcel71 »

Not sure if i am correct. but when i do the following on the command:

Code: Select all

convert -background transparent -density 72 -fill black -font Arial-Bold -pointsize 60 label:"Marcel" -write mpr:text -delete 0 <do sth else here and use mpr:text >
Then all the settings i did like background, density, font etc.. is remembered after the -delete 0. Is there a command that from there i can start a clean convert again and use the mpr:text after that?

Regards,
Marcel
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Clear image setting history

Post by snibgo »

No, there is no "return to defaults" command.

EDIT: http://www.imagemagick.org/script/comma ... arentheses may be of some help.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Clear image setting history

Post by fmw42 »

Use parenthesis and add at the beginning before the first parenthesis -regard-parenthesis

convert -regard-parenthesis \( ..... \) .....

This usually works, but for some things like -compose settings you may need to reset it again as -compose over. You can also try adding +geometry and +channel etc to reset individual setting.

see
http://www.imagemagick.org/Usage/basics/#controls
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: Clear image setting history

Post by GreenKoopa »

If -regard-parenthesis isn't sufficient, you could always resort to pipes.

Code: Select all

convert -background transparent -density 72 -fill black -font Arial-Bold -pointsize 60 label:"Marcel" miff:- | convert - <do sth else here>
Using txt:- strips even more.

This doesn't work for me in 6.8.5-6, but it used to very recently. Did I do this incorrectly, or is this a new bug?

--- EDIT ---
This worked back in 6.8.3-0 and 6.8.4-8, and works again in 6.8.5-8. Whatever was wrong with miff in this case was fixed quickly.
Last edited by GreenKoopa on 2013-05-31T11:34:07-07:00, edited 1 time in total.
Marcel71
Posts: 49
Joined: 2011-04-13T13:57:34-07:00
Authentication code: 8675308

Re: Clear image setting history

Post by Marcel71 »

Thanks that helped. Now i do not have to save the intermediate image :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Clear image setting history

Post by fmw42 »

This works fine for me in 6.8.5.8 Q16 Mac

convert -background transparent -density 72 -fill black -font Arial-Bold -pointsize 60 label:"Marcel" miff:- | convert - show:

Miff did have a number of problems recently as I had reported in some bug reports, but they have now been fixed.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Clear image setting history

Post by anthony »

Clear or reset all settings is something planned for IMv7, as is clear/reset all settings and images (sort of restart).

Otherwise you will need to use parenthesis with a -regard-parenthesis option.

IMv7 will also have a different set parenthesis to 'push/pop settings', with -regard-parenthesis merging the setting parenthesis with the image parenthesis.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply