Page 1 of 1

IMv7 escapes being worked on

Posted: 2012-04-26T20:55:34-07:00
by anthony
At the moment I am working on Settings, and Percent Escapes, so as to make them more global, and allow them in geometry arguments. Specifically. A '%' after a number is a literal % NOT an escape, unless followed by a '['. That way you can use % in geometry arguments as previously but still allow a percent escapes to follow a number if needed.

Also make '%[x]' where 'x' is a single character work just like a normal '%x' . This currently does NOT work in IMv6 but will probably be backported to IMv6 first, so that using %[...] for all escapes will work even for single letter escapes. NOTE: %w and %[width] mean different things!

This was proposal 2, and was deems the most backward compatible. See...
http://www.imagemagick.org/Usage/bugs/I ... rcent.html
Other proposals are still present but will be commented out in the HTML shortly.

Example usage (This is a string arg not a geometry arg but it will illustrate what is happening) ....

Code: Select all

magick  -size 100x100 xc: -print '45%x\n' null:   # IMv6 will substitute, IMv7 will not substitute
45%x
magick  -size 100x100 xc: -print '45%[h]\n' null:     # falls in current IMv6 until backported
45100
magick  -size 100x100 xc: -print '45x%h\n' null:
45x100
magick  -size 100x100 xc: -print '%wx%h\n' null:
100x100