mogrify tries to convert subdirectories?

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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

mogrify tries to convert subdirectories?

Post by snibgo »

On Windows 7, IM 6.6.2-4 Q16.

Code: Select all

md xyxxy
md xyz
mogrify -path xyz tom.jpg
(Works no problem.)

Code: Select all

mogrify -path xyz t*.jpg
mogrify: unable to open image `xyxxy\': No such file or directory @ error/blob.c/OpenBlob/2491.
mogrify: no decode delegate for this image format `xyxxy\' @ error/constitute.c/ReadImage/532.
mogrify: unable to open image `xyz\': No such file or directory @ error/blob.c/OpenBlob/2491.
mogrify: no decode delegate for this image format `xyz\' @ error/constitute.c/ReadImage/532.
The conversion of all files named t*.jpg completes succesfully, then mogrify fails with errors.

The problem also occurs for PNG files (maybe for all types, but untested).

The problem doesn't occur with IM 6.6.1-1 Q8 or 6.6.0-8 Q16.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: mogrify tries to convert subdirectories?

Post by magick »

We'll have a fix for the problem you reported within a day or two. Thanks.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: mogrify tries to convert subdirectories?

Post by snibgo »

Thanks for the usual very swift response.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: mogrify tries to convert subdirectories?

Post by magick »

Curious. We cannot reproduce the problem with Windows NT or Windows Server 2003. We'll try it under Windows 7 in a day or two.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: mogrify tries to convert subdirectories?

Post by Drarakel »

This happens on Windows XP, too. (Currently with IM v6.6.2-7 Q16.)
For example, if I'm trying to load (non-existent) files - with IM v6.5.8-5, it's ok (there were subdirectories):

Code: Select all

identify *.foo
identify: unable to open image `*.foo': Invalid argument @ blob.c/OpenBlob/2480.
With IM v6.6.2-7 (without subdirectories) - ok:

Code: Select all

identify *.foo
Magick: unable to open image `*.foo': Invalid argument @ error/blob.c/OpenBlob/2498.
Magick: no decode delegate for this image format `*.foo' @ error/constitute.c/ReadImage/532.
With IM v6.6.2-7 (now with subdirectories):

Code: Select all

identify *.foo
Magick: unable to open image `temp1\': No such file or directory @ error/blob.c/OpenBlob/2498.
Magick: no decode delegate for this image format `temp1\' @ error/constitute.c/ReadImage/532.
Magick: unable to open image `temp2\': No such file or directory @ error/blob.c/OpenBlob/2498.
Magick: no decode delegate for this image format `temp2\' @ error/constitute.c/ReadImage/532.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: mogrify tries to convert subdirectories?

Post by magick »

We can reproduce this problem and will have a patch within a day or two. Thanks.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: mogrify tries to convert subdirectories?

Post by Drarakel »

Yep, fixed in v6.6.2-8. Thanks from me, too!
dethkitty
Posts: 2
Joined: 2012-08-03T18:56:15-07:00
Authentication code: 67789

Re: mogrify tries to convert subdirectories?

Post by dethkitty »

Hi, I found this thread via google for imagemagick mogrify subfolders, I was wondering could anyone tell us what you would type into Windows command prompt to make mogrify convert all BMPs (from FRAPS captures taken in realtime, I use BMP so it doesn't lag the games like compressing to PNG does) to PNGs in subfolders?

Basically I want to mogrify all the BMP files in C:\Captures\ and all the files inside it and all the files inside the subfolders / subdirectories inside it - I know to do this with just the files in one folder is mogrify -format png *.bmp but that ignores all the stuff in the folders beneath :(

After googling a bit I tried making a .BAT batch file in Notepad of for %%a in (*.bmp) do convert -format png "%%a" but that doesn't seem to work at all, and I don't really know how to program the stuff myself :(

Any help would be great (and probably useful for all the other people googling trying to work out how to make it convert stuff in subfolders too! I was surprised on the mogrify help page that there was no argument for subfolders built into it already, really! :))
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: mogrify tries to convert subdirectories?

Post by fmw42 »

I am not a Windows user, but I do not believe that IM 6 mogrify (windows or unix) will traverse subfolders. The only way to do that is to write a script and in your case that would be a bat file.

I am not sure what is in store for IM 7 (in alpha development).

You might take a look at http://www.imagemagick.org/Usage/windows/ to see if there are any hints there.
dethkitty
Posts: 2
Joined: 2012-08-03T18:56:15-07:00
Authentication code: 67789

Re: mogrify tries to convert subdirectories?

Post by dethkitty »

*cries*
Post Reply