Page 1 of 1

possible bug -scene when used in filenames

Posted: 2018-02-01T12:16:02-07:00
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.

Re: possible bug -scene when used in filenames

Posted: 2018-02-26T13:58:28-07:00
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.

Re: possible bug -scene when used in filenames

Posted: 2018-02-27T18:38:07-07:00
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.

Re: possible bug -scene when used in filenames

Posted: 2018-02-27T18:57:58-07:00
by fmw42
Thanks

Re: possible bug -scene when used in filenames

Posted: 2018-02-28T20:17:30-07:00
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.

Re: possible bug -scene when used in filenames

Posted: 2018-03-01T05:43:13-07:00
by magick
We're still working on the problem. We should have it fixed by this weekend.

Re: possible bug -scene when used in filenames

Posted: 2018-03-01T10:27:02-07:00
by fmw42
OK Thanks.

Re: possible bug -scene when used in filenames

Posted: 2018-03-04T15:29:10-07:00
by fmw42
Thanks. This seems to be fixed in IM 7.0.7.25 Q16 HDRI Mac OSX Sierra.