">" character causes problems
Posted: 2007-02-26T05:44:10-07:00
to me it seems quite hazardious to use the ">" character like this. if you for instance write:
convert -resize 640x480> source.png dest.jpg
then on windows this will actually overwrite the source file with empty data, because the ">" is interpreted as a pipe to stdout.
i know applying doublequotes, eg. ** -resize "640x480">" ** but this causes yet new problems when using imagemagick from php, where the strict mode enforces escaping of its own, leaving me with double escaping. if i remove my own quotes, then it doesn't work on windows (the source file is overwritten like described above).
i have browsed the imagemagic manuals and there seems to be no alternative way to enforce this option.
i would strongly encourage the developer to create a new, ordinary "-option" based on alphabetical characters for all the ">", "<", "!" and "@" options, as this would seem safer and less prone to mistakes.
or let me know if such methods already do exist. thanks.
convert -resize 640x480> source.png dest.jpg
then on windows this will actually overwrite the source file with empty data, because the ">" is interpreted as a pipe to stdout.
i know applying doublequotes, eg. ** -resize "640x480">" ** but this causes yet new problems when using imagemagick from php, where the strict mode enforces escaping of its own, leaving me with double escaping. if i remove my own quotes, then it doesn't work on windows (the source file is overwritten like described above).
i have browsed the imagemagic manuals and there seems to be no alternative way to enforce this option.
i would strongly encourage the developer to create a new, ordinary "-option" based on alphabetical characters for all the ">", "<", "!" and "@" options, as this would seem safer and less prone to mistakes.
or let me know if such methods already do exist. thanks.