Page 1 of 1

Clear image setting history

Posted: 2013-05-31T08:42:15-07:00
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

Re: Clear image setting history

Posted: 2013-05-31T08:57:20-07:00
by snibgo
No, there is no "return to defaults" command.

EDIT: http://www.imagemagick.org/script/comma ... arentheses may be of some help.

Re: Clear image setting history

Posted: 2013-05-31T09:26:09-07:00
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

Re: Clear image setting history

Posted: 2013-05-31T10:43:35-07:00
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.

Re: Clear image setting history

Posted: 2013-05-31T10:56:01-07:00
by Marcel71
Thanks that helped. Now i do not have to save the intermediate image :)

Re: Clear image setting history

Posted: 2013-05-31T13:21:57-07:00
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.

Re: Clear image setting history

Posted: 2013-06-23T23:09:29-07:00
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.