possible bug -scene when used in filenames

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug -scene when used in filenames

Post by fmw42 »

I have a 3 page pdf:

http://www.fmwconcepts.com/misc_tests/test.pdf

Problem 1:

In IM 6.9.9.34 Q16 Mac OSX Sierra, if I run this command

Code: Select all

convert -density 150 test.pdf -scene 1 -set filename:mysize '%s_%wx%h' -compress zip +adjoin new_%[filename:mysize].tif
The resulting image are named:

Code: Select all

new_0_533x533.tif
new_1_552x694.tif
new_2_833x623.tif
Note that -scene seems to be ignored, since the file name scene numbers start with 0 and not 1



Problem 2:

In IM 7.0.7.22 Q16 HDRI Mac OSX Sierra, if I run the same command as

Code: Select all

magick -density 150 test.pdf -scene 1 -set filename:mysize '%s_%wx%h' -compress zip +adjoin new_%[filename:mysize].tif
The resulting image are named:

Code: Select all

new_1_533x533.tif
new_1_552x694.tif
new_1_833x623.tif
Here all names start with 1 and do not increase to 2 and 3.


If I remove the -scene 1 from the command, then I properly get the following file names:

Code: Select all

new_0_533x533.tif
new_1_552x694.tif
new_2_833x623.tif

P.S. Is there any way to get scene numbers with leading zeros? If not, can a new -define be created to allow such? For example -define scene:zeroes=N or something like that, where N is the number of leading zeroes or -define filename:scene-zeroes=N, or something like that.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -scene when used in filenames

Post by fmw42 »

There does not appear to be any changes to fix the issues with these commands in the latest IM 6.9.9.35 and 7.0.7.23. Have I missed something or has this not yet been addressed.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug -scene when used in filenames

Post by magick »

The correct command is:

Code: Select all

magick -density 150 -scene 4 test.pdf -set filename:mysize '%wx%h' -compress zip +adjoin 'new_%02d_%[filename:mysize].tif''
However, for that to work as intended, a patch is required. Look for it in a beta release of ImageMagick within a day or two.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -scene when used in filenames

Post by fmw42 »

Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -scene when used in filenames

Post by fmw42 »

Testing this in IM 7.0.7.24 Q16 HDRI Mac OSX and IM 6.9.9.36 Q16, I get an issue with the filename part

Code: Select all

magick -density 150 -scene 4 test.pdf -set filename:mysize '%wx%h' -compress zip +adjoin 'new_%02d_%[filename:mysize].tif'
produces:

new_04_%[533x533.tif
new_05_%[533x533.tif
new_06_%[533x533.tif

the %[ should not be included.

Note I removed the extraneous single quote from the end of your posted command.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug -scene when used in filenames

Post by magick »

We're still working on the problem. We should have it fixed by this weekend.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -scene when used in filenames

Post by fmw42 »

OK Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -scene when used in filenames

Post by fmw42 »

Thanks. This seems to be fixed in IM 7.0.7.25 Q16 HDRI Mac OSX Sierra.
Post Reply