Wierd convert bug in Windows?

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
bbstrikesagain

Wierd convert bug in Windows?

Post 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
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Wierd convert bug in Windows?

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Wierd convert bug in Windows?

Post by magick »

The problem you reported is fixed in ImageMagick 6.5.4-3 Beta available sometime tomorrow. Thanks for the bug report.
bbstrikesagain

Re: Wierd convert bug in Windows?

Post 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.
Post Reply