Batch magnify from a folder to an another one [solved]
Batch magnify from a folder to an another one [solved]
Hi, I'm totally new here. I use ImageMagick-7.0.8-Q16 on Windows 10.
I wish to use the -magnify command (scale2x filter) to .png files toward an another folder in .png format.
I've got simply two questions:
- Can someone tell me what is the correct command line to do this?
- Can you explain what -minify command exactly does on an image?
Thank you for your help!
I wish to use the -magnify command (scale2x filter) to .png files toward an another folder in .png format.
I've got simply two questions:
- Can someone tell me what is the correct command line to do this?
- Can you explain what -minify command exactly does on an image?
Thank you for your help!
Last edited by kimono on 2019-04-09T04:06:05-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch magnify from a folder to an another one
Change directories to the folder where you have your input. Be sure you already have an output directory.
There is no minify function according to the commands list at https://imagemagick.org/script/command-line-options.php
If you want a general enlarging or shrinking image command, then use -resize.
Code: Select all
magick.exe image.png -magnify paphto_output_directory\image.png
If you want a general enlarging or shrinking image command, then use -resize.
Re: Batch magnify from a folder to an another one
@fmw42: Thanks for your answer. I've got a folder with around 100 png images and I wish to magnify all of them in one time to another directory.
How can I do that?
Is -resize (= nearest neighbor? )the best way to shrink an image without having a blurred pixelart?
How can I do that?
Is -resize (= nearest neighbor? )the best way to shrink an image without having a blurred pixelart?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch magnify from a folder to an another one
1) use mogrify -- it will process all images in a folder and write to a new folder
create a new folder
change directories to the current folder
magic.exe mogrify -path path_to_new_folder -magnify *.png
See https://imagemagick.org/Usage/basics/#mogrify
2) you resize smaller using nearest neighbor as -filter nearestneighbor -resize ...
or
use -sample
see
https://imagemagick.org/script/command- ... php#resize
https://imagemagick.org/script/command- ... php#sample
________________
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
create a new folder
change directories to the current folder
magic.exe mogrify -path path_to_new_folder -magnify *.png
See https://imagemagick.org/Usage/basics/#mogrify
2) you resize smaller using nearest neighbor as -filter nearestneighbor -resize ...
or
use -sample
see
https://imagemagick.org/script/command- ... php#resize
https://imagemagick.org/script/command- ... php#sample
________________
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
Re: Batch magnify from a folder to an another one
Ok I tested this:
It seems that the magnify option is not recognized.
Can you tell me what I've done wrong? Thank you
Code: Select all
C:\ImageMagick-7.0.8-Q16>magick.exe mogrify -path Karatedo -magnify *.png
mogrify: UnrecognizedOption `-magnify' @ error/mogrify.c/MogrifyImageCommand/5557.
Can you tell me what I've done wrong? Thank you
Last edited by kimono on 2019-04-03T00:18:57-07:00, edited 1 time in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch magnify from a folder to an another one
"-magnify" isn't an option for "magick mogrify".
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch magnify from a folder to an another one
You can request that it be added on the Discourse server. In the meantime you will have to write a loop over all the images you want to process or the images in a folder and use convert or magick to process them depending upon what your IM version is - 6 or 7.
Re: Batch magnify from a folder to an another one
@snibgo: Thanks for the information, I'll search where I can post this request.
@fmw42: I use the latest version of IM-7 and I don't know how to write a loop :/. Can you show me please the global writing?
@fmw42: I use the latest version of IM-7 and I don't know how to write a loop :/. Can you show me please the global writing?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch magnify from a folder to an another one
Sorry, I do not use Windows. I can show you in Unix, but then you would need to use Windows 10 Unix. Perhaps one of the Windows users here can help you further or do a Google search for .bat scripting.
Re: Batch magnify from a folder to an another one
I retested with an updated version (ImageMagick-7.0.8-38-Q16-x64-dll) and I've got the following message:
"Le client ne dispose pas d'un privilège nécessaire"
"Client does not have a necessary privilege"
I reboot windows 10 and authorized to have a total control with all the files of the Imagemagick folder and the input folder but it doesn't seem to work.
Do you have any clue on how to solve it?
"Le client ne dispose pas d'un privilège nécessaire"
"Client does not have a necessary privilege"
I reboot windows 10 and authorized to have a total control with all the files of the Imagemagick folder and the input folder but it doesn't seem to work.
Do you have any clue on how to solve it?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch magnify from a folder to an another one
I don't think that message came from ImageMagick.
What were your commands? Which command produced that message?
What were your commands? Which command produced that message?
snibgo's IM pages: im.snibgo.com
Re: Batch magnify from a folder to an another one
I came from that command line:
Is it because I don't have an output folder? Do you know how I cad add an output to this command line?
Code: Select all
C:\ImageMagick-7.0.8-Q16>magick.exe mogrify -path Karatedo -magnify *.png
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch magnify from a folder to an another one
You are in the ImageMagick installation directory, and running the command from there. This is a bad idea. I suggest you create a different directory for your image processing, and change to that directory.kimono wrote:C:\ImageMagick-7.0.8-Q16>magick.exe
Ensure that "C:\ImageMagick-7.0.8-Q16" is on your system path.
You are writing to the output directory "Karatedo". If that directory does not exist, the command will fail.
snibgo's IM pages: im.snibgo.com
Re: Batch magnify from a folder to an another one
@snibgo: I think I had got a problem of read only with some files in win10. I run a window command as administrator and I've got the following message:
So the correct command could be:
?
Code: Select all
Access Denied.
Code: Select all
C:\[Inputfolder]>magick.exe mogrify -path [outputfolder] -magnify *.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch magnify from a folder to an another one
The output directory must be created ahead of time. Mogrify will not create one.
create a new directory Karatedo
change directory to your directory containing the images. Do not work in the ImageMagick directory as snibgo said.
create a new directory Karatedo
change directory to your directory containing the images. Do not work in the ImageMagick directory as snibgo said.
Code: Select all
magick.exe mogrify -path path_to_existing/Karatedo -magnify *.png