%d escape problem when used with Image Property Percent Escapes
Posted: 2019-02-07T13:18:12-07:00
Minimal example that exhibits the problem:
Relevant documentation: https://www.imagemagick.org/Usage/files/#save_escapes
Code: Select all
convert rose: 'rose_%d.png'
# Resulting filename: rose_0.png (as expected)
convert rose: -set filename:mysize "%wx%h" 'rose_%[filename:mysize]_%d.png'
# Resulting filename: rose_70x46_%d0.png
# Why is '%d' in the output filename?
# Expected: rose_70x46_0.png
convert rose: -set filename:mysize "%wx%h" 'rose_%d_%[filename:mysize].png'
# Resulting filename: rose70x46.png
# Expected: rose_0_70x46.png