Page 1 of 1

Wierd convert bug in Windows?

Posted: 2009-07-10T02:57:10-07:00
by bbstrikesagain
Hello,

In Windows cmd convert seems to fail if BOTH of these are true:
  • - the output file doesn't already exist
    - there is a subdirectory in the working directory
As an example, here's transcript to show this:

  • H:\IMstuff>convert AI1957[1].gif AI1957[1].png
    H:\IMstuff>convert AI1957[1].gif AI1957[1].png
    H:\IMstuff>mkdir AnotherFolder
    H:\IMstuff>convert AI1957[1].gif AI1957[1].png
    H:\IMstuff>rmdir AnotherFolder
    H:\IMstuff>convert AI1957[1].gif AI1957[1].png
    H:\IMstuff>del AI1957[1].png
    H:\IMstuff>convert AI1957[1].gif AI1957[1].png
    H:\IMstuff>del AI1957[1].png
    H:\IMstuff>mkdir AnotherFolder
    H:\IMstuff>convert AI1957[1].gif AI1957[1].png

    convert: unable to open image `AnotherFolder\': Invalid argument @ blob.c/OpenBlob/2476.
    H:\IMstuff>
[/size]
If the specified output file exists, it's replaced by the new version no problem, but if it doesn't exist it won't be created unless there are no other subdirectories present...

Why on earth does convert look in AnotherFolder, when it was given the name of the file it should create?

Am I missing something, or is this a weird bug in IM convert?

BB.

Windows XP SP3, IM installled from ImageMagick-6.5.4-2-Q16-windows-dll.exe

Re: Wierd convert bug in Windows?

Posted: 2009-07-10T09:26:12-07:00
by el_supremo
It's something to do with the having square brackets in the output filename.
On Win XP Pro SP3 and IM 6.4.6 Q8 with no subdirectories:

Code: Select all

convert logo: logo[1].png
produces the file "logo.png", but then:

Code: Select all

mkdir whatever
convert logo: logo[1].png
produces the file "logo[1].png"

However, I don't know if it's useful to use [1] in a png file.

Pete

Re: Wierd convert bug in Windows?

Posted: 2009-07-10T17:47:59-07:00
by magick
The problem you reported is fixed in ImageMagick 6.5.4-3 Beta available sometime tomorrow. Thanks for the bug report.

Re: Wierd convert bug in Windows?

Posted: 2009-07-12T14:48:44-07:00
by bbstrikesagain
I guess it was a weird one. The [1] came by default from some app or other - it was just a test of the cmd script, none of my real directories have such names, so it was an (un?)lucky accident. Great to know it was a bug and will be fixed so quickly. I will download to the target machine and try again.
magick wrote:The problem you reported is fixed in ImageMagick 6.5.4-3 Beta available sometime tomorrow. Thanks for the bug report.