I'm creating a batch script that will allow my clients to use ImageMagick on Windows (2000/XP/Vista) to resize and change resolution of photos from a batch file. The folder containing the images then has to be uploaded to my server.
I've got a real problem though. It appears that most windows computers don't come with a compression utility that can be accessed from cmd.exe. Which means that I can process the images from the batch file, but I can't zip or compress the folder without having to get every client to download and install 7z.
I know that ImageMagick can compress individual images. I'm wondering whether that compression can be extended to compress folders as well ? I know it's a bit of a long shot, but if anyone can think of a way in which my clients would be able to process and compress using only one program / installation. Then that'd be really helpful ...
How difficult would it be to bundle a compression utility with the ImageMagick libs ?
Thanks,
Compression Issue ....
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Compression Issue ....
IM will allow the use of gzip to automatically compress and uncompress individual images. For example reading or writing "image.tiff.gz".
See http://imagemagick.org/Usage/files/#save
However it does not currently understand things like zip, tar, lhz, or zoo multi-file compressed archieves.
That does not however mean it couldn't do this particularly as all the mentioned archive types (except tar.gz) does allow you to do piped extraction, and piped replacement of specific files from those archives. All that is needed is someone to write the appropriate 'coder' module.
For example (But has not been created - yet) a 'zip:' coder could let you do something like this...
zip:path/to/archive.zip/image.jpg
to pipeline (or use temp files) to the "image.jpg" file to/from the
specified 'zip' archive.
NOTE: you can also create a external (and thus slower) delegate script for handling 'zip' archives too. I probably should do more information and examples of creating 'delegates' in IM Examples.
http://imagemagick.org/Usage/files/#delegates
See http://imagemagick.org/Usage/files/#save
However it does not currently understand things like zip, tar, lhz, or zoo multi-file compressed archieves.
That does not however mean it couldn't do this particularly as all the mentioned archive types (except tar.gz) does allow you to do piped extraction, and piped replacement of specific files from those archives. All that is needed is someone to write the appropriate 'coder' module.
For example (But has not been created - yet) a 'zip:' coder could let you do something like this...
zip:path/to/archive.zip/image.jpg
to pipeline (or use temp files) to the "image.jpg" file to/from the
specified 'zip' archive.
NOTE: you can also create a external (and thus slower) delegate script for handling 'zip' archives too. I probably should do more information and examples of creating 'delegates' in IM Examples.
http://imagemagick.org/Usage/files/#delegates
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Compression Issue ....
Hi anthony,
Thanks.
Anthony would it be a big job to do something like that ? I guess the script would still have to wrapped up in a windows installer ..
Also, how come ImageMagick needs to be installed ? It's too large to just run as a normal script I take it ? Or it needs access to static or dynamic system libs ?
Cheers,
Thanks.
Anthony would it be a big job to do something like that ? I guess the script would still have to wrapped up in a windows installer ..
Also, how come ImageMagick needs to be installed ? It's too large to just run as a normal script I take it ? Or it needs access to static or dynamic system libs ?
Cheers,