Skip to content

4 Band tiff to CMYK jpg without changing the channels, using fast libraries

License

Notifications You must be signed in to change notification settings

mikealsim/RGBA_tiff_to_jpg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RGBA_tiff_to_jpg

4 Band tiff to CMYK jpg to preserve 4 channels @ 8 bit as a jpg and can the reverse process, using fast libraries TurboJpeg and vips. Created to compress 4 band tiffs for ftp while still being an easly viewable format, CMYK jpgs are up to 20% more effeciant than 2 seperate jpgs.

While the jpg is stored as CMYK, the channels are unchanged.
R=C
G=M
B=Y
A=K

This should be about 3.5 times faster than compairable imagemagick scripts

To use:

-h, --help            show this help message and exit
-i INPATH, --inpath INPATH
                  path to input file or folder
-o OUTPATH, --outpath OUTPATH
                  path to output file or folder
-q QUALITY, --quality QUALITY
                  jpeg quality value [0-100]
-f {j,jpg,t,tif}, --format {j,jpg,t,tif}
                  output format
-ov, --overwrite      replace existing files
-r, --recurse         include all sub dirrectories
-cpu CPU, --cpu CPU   Percent of threads to CPUs [150 - 25]

Install:

requires python, 64bit suggested, tested with 3.8.6 on windows 10

install libjpeg-turbo
https://sourceforge.net/projects/libjpeg-turbo/files/

install vips lib
https://github.com/libvips/libvips/releases
add vips\bin to system path (restart recomended)

pip install -r requirements.txt

About

4 Band tiff to CMYK jpg without changing the channels, using fast libraries

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages