Last active
August 29, 2015 14:16
-
-
Save patrickfav/21aa5bc96cd6fb9dbed1 to your computer and use it in GitHub Desktop.
Windows Batch Imagemagick png to pdf wrapped cmyk-jpeg: pass path as paramter like so: .\convert_cmyk.bat C:\my-path-to-pngs\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo This script converts png files to cmyk colorspaced jpgs wrapped in pdf for latex | |
echo Start converting... | |
echo. | |
for %%f in (%~1*) do if /i %%~xf==.png ( | |
echo Converting %%f to cmyk jpeg compressed %%~nf.pdf | |
convert %%f +profile "*" -profile "path/to/rgb.icc" -profile "path/to/cmyk.icc" -strip -sampling-factor 1x1 -quality 95 -compress JPEG %%~pf\%%~nf.pdf | |
) | |
echo. | |
echo Done converting. | |
echo. | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was used in my master thesis to convert all pngs to cmyk jpg pdfs, a format that is easy to use with latex