Convert TIFFs from LZW to ZIP format in PowerShell
-
- Posts: 2
- Joined: 2017-11-28T11:26:23-07:00
- Authentication code: 1152
Convert TIFFs from LZW to ZIP format in PowerShell
I'm running PowerShell script that downloads a collection of tiff files and uploads them to an image repository as a nightly process. Currently, the tiff files use LZW format, and the program that exports them doesn't give an option for their output compression in ZIP format. The image repository allows annotations to be added to tiff files, but only if they use ZIP. I've read through the Command-line processing section of the site & searched through the forums but haven't found a command for this particular operation. I'd appreciate any help anyone could offer.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert TIFFs from LZW to ZIP format in PowerShell
ImageMagick command line
see http://www.imagemagick.org/script/comma ... p#compress
If using ImageMagick 7, then change convert to magick.
Code: Select all
convert image.tif -compress zip image.tif
If using ImageMagick 7, then change convert to magick.
-
- Posts: 2
- Joined: 2017-11-28T11:26:23-07:00
- Authentication code: 1152
Re: Convert TIFFs from LZW to ZIP format in PowerShell
How would you iterate through a list of tiffs? I triedfmw42 wrote: ↑2017-11-28T11:43:54-07:00 ImageMagick command line
see http://www.imagemagick.org/script/comma ... p#compressCode: Select all
convert image.tif -compress zip image.tif
If using ImageMagick 7, then change convert to magick.
Code: Select all
magick *.tif -compress zip *.tif
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Convert TIFFs from LZW to ZIP format in PowerShell
The "mogrify" tool might be a better choice for that. Maybe try something like this...ReadyPlayerOne wrote: ↑2017-11-28T12:45:19-07:00How would you iterate through a list of tiffs? I triedand got a blob error.Code: Select all
magick *.tif -compress zip *.tif
Code: Select all
magick mogrify -compress zip *.tif
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert TIFFs from LZW to ZIP format in PowerShell
You cannot use wildcards for both input and output with magick/convert. To process a folder of images, you need to use mogrify as per GeeMack's comment.How would you iterate through a list of tiffs? I triedand got a blob error.Code: Select all
magick *.tif -compress zip *.tif