[magick-users] Backslashes and percentage signs in image comments
Felix Hagemann
felix.hagemann at jrc.nl
Thu Feb 15 10:46:17 CST 2007
Hello,
I try to add image comments that contain backslashes and/or percentage
signs but I am not having much success. Consider the following
example:
$ convert -comment 'test\123\456\n%%w' logo: png:- | identify \
-format '%c' png:-
Its output for ImageMagick 6.2.3 and some earlier versions, which were
available for testing:
test\123\456
640
For ImageMagick 6.2.4:
test1346
641
So my questions are:
- How can I escape the backslashes so that they get included in the
comment with the newer version? I tried double, triple backslashes,
combinations with %-signs and some more. Backslashes only seem to eat
away the second character to their right, parsing the string right to
left.
- In both versions using a % to escape the special meaning of the
following % as suggested in some documentation does not work. How to
include a percentage in a comment?
Can somebody point me to some documentation that would help me resolve
those issues? I haven't found anything. Or maybe just point me to the
source file in which I can find the parsing routine so I can have a
look myself?
Thanks in advance!
Felix
More information about the Magick-users
mailing list