Mogrify doesnt work in .bat-file. What to do?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Mogrify doesnt work in .bat-file. What to do?

Post by fmw42 »

Please read my edit above
MomentumHunt91
Posts: 26
Joined: 2015-08-03T14:15:55-07:00
Authentication code: 1151

Re: Mogrify doesnt work in .bat-file. What to do?

Post by MomentumHunt91 »

after you cd to the input directory
Sry didn´t noticed.^^
MomentumHunt91
Posts: 26
Joined: 2015-08-03T14:15:55-07:00
Authentication code: 1151

Re: Mogrify doesnt work in .bat-file. What to do?

Post by MomentumHunt91 »

Just tried it now. I believe I´m to stupid/tired.. for it. <.<
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Mogrify doesnt work in .bat-file. What to do?

Post by fmw42 »

try tomorrow when you are more rested and let us know.
MomentumHunt91
Posts: 26
Joined: 2015-08-03T14:15:55-07:00
Authentication code: 1151

Re: Mogrify doesnt work in .bat-file. What to do?

Post by MomentumHunt91 »

Okay i will tell u tomorrow then. Tyvm for your help.
MomentumHunt91
Posts: 26
Joined: 2015-08-03T14:15:55-07:00
Authentication code: 1151

Re: Mogrify doesnt work in .bat-file. What to do?

Post by MomentumHunt91 »

Found this side:
http://stackoverflow.com/questions/2554 ... s-specifie
This guys did actually the same thing like me! xd Tried it out with %% and with his others codes in down. But it doesn´t work:
http://img5.fotos-hochladen.net/uploads ... bo2gqx.png
(It creates a SDtemp-NoNameData_unable to open)

This doesn´t work neither:
http://img5.fotos-hochladen.net/uploads ... kzjomt.png
(It´s no change to my first try)

All of them doesn´t point out an error they work without failure. All of them just got ONE problem.
NO ONE resize them!

I´m done... don´t know what to do anymore.

I´m back @ 20:00 9,5hours at my time. Hope someone finds a way to do it.
Much Thanks
MomentumHunt91
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Mogrify doesnt work in .bat-file. What to do?

Post by snibgo »

The command works fine for me, IM v6.9.1--6 on Windows 8.1, with forwards or backslash.

Code: Select all

f:\web\im>mogrify -verbose -format png -resize 50% temp/*@2x*.png

temp\another@2x.png PNG 200x300 200x300+0+0 8-bit Grayscale Gray 2c 294B 0.000u0:00.000
temp\another@2x.png PNG 200x300=>100x150 100x150+0+0 8-bit Gray 2c 279B 0.016u 0:00.016
temp\example@2x.png PNG 100x75 100x75+0+0 8-bit sRGB 16.3KB 0.031u 0:00.015
temp\example@2x.png PNG 100x75=>50x38 50x38+0+0 8-bit sRGB 4.46KB 0.000u 0:00.000
When you use "-verbose", what is the text output?

What version IM are you using? "convert -version". Is it the pre-bilt binary or did you compile it yourself?

What Windows version?
snibgo's IM pages: im.snibgo.com
MomentumHunt91
Posts: 26
Joined: 2015-08-03T14:15:55-07:00
Authentication code: 1151

Re: Mogrify doesnt work in .bat-file. What to do?

Post by MomentumHunt91 »

snibgo wrote:The command works fine for me, IM v6.9.1--6 on Windows 8.1, with forwards or backslash.

Code: Select all

f:\web\im>mogrify -verbose -format png -resize 50% temp/*@2x*.png

temp\another@2x.png PNG 200x300 200x300+0+0 8-bit Grayscale Gray 2c 294B 0.000u0:00.000
temp\another@2x.png PNG 200x300=>100x150 100x150+0+0 8-bit Gray 2c 279B 0.016u 0:00.016
temp\example@2x.png PNG 100x75 100x75+0+0 8-bit sRGB 16.3KB 0.031u 0:00.015
temp\example@2x.png PNG 100x75=>50x38 50x38+0+0 8-bit sRGB 4.46KB 0.000u 0:00.000
When you use "-verbose", what is the text output?

What version IM are you using? "convert -version". Is it the pre-bilt binary or did you compile it yourself?

What Windows version?
It does work for you? WOW....okay. The first nice thing i heard now..^^
I don´t use IM i just created an txt. and saved it as .bat on windows 7 premium.
I did it by myself yes.
IM v6.9.1--6 on Windows 8.1.
Ty for the respond!
I will try this version out to. Maybe that´s my problem here.

Found v.6.9.1-10
http://www.imagemagick.org/script/download.php
Last edited by MomentumHunt91 on 2015-08-04T07:48:07-07:00, edited 2 times in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Mogrify doesnt work in .bat-file. What to do?

Post by snibgo »

From my verbose output, you can see it processed two files, resizing both of them. I strongly suggest you try it with "-verbose" and paste the text output here.
snibgo's IM pages: im.snibgo.com
MomentumHunt91
Posts: 26
Joined: 2015-08-03T14:15:55-07:00
Authentication code: 1151

Re: Mogrify doesnt work in .bat-file. What to do?

Post by MomentumHunt91 »

Didn´t worked with -verbose.
Here my text output.
http://img5.fotos-hochladen.net/uploads ... c2ta6s.png
f:\web\im>mogrify -verbose -format png -resize 50% temp/*@2x*.png
Your output was made with %CD%:\web\im>
I hardly think i need to install it.
EDIT: Found the install.exe.
http://img5.fotos-hochladen.net/uploads ... rpj1n5.png

I CAN FINALY USE mogrify!
Here MyNewErrorMessageOutput:
http://img5.fotos-hochladen.net/uploads ... j1k08x.png
Last edited by MomentumHunt91 on 2015-08-04T08:12:48-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Mogrify doesnt work in .bat-file. What to do?

Post by snibgo »

You copy files to directory "SDtemp", but then use mogrify on directory "temp".
snibgo's IM pages: im.snibgo.com
MomentumHunt91
Posts: 26
Joined: 2015-08-03T14:15:55-07:00
Authentication code: 1151

Re: Mogrify doesnt work in .bat-file. What to do?

Post by MomentumHunt91 »

snibgo wrote:You copy files to directory "SDtemp", but then use mogrify on directory "temp".
My program runs completely now.

Special thanks to:
snibgo
fmw42
ceepea

If u want to use it too:
http://www.mediafire.com/download/r26x7 ... HDtoSD.rar

You can actualy use for all .png/.jpg images with an "@2x" in the end.
It copy them and put them into a temp-folder where it resize it to -50% and rename it without @2x.

Just much thanks.
MomentumHunt91

#CLOSED
Post Reply