add hires output

This commit is contained in:
Raghavendra Kamath 2016-01-30 19:54:21 +05:30
parent 8ed68327ac
commit 6f3945bf34
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ export cwd="$PWD"
#create appropriate folders for output
mkdir output-lowres
mkdir output-hires
#create a folder in tmp for unzipping contents of kra file
mkdir -p /tmp/kra-output
@ -25,6 +26,7 @@ unzip -j "$f" "mergedimage.png" -d "/tmp/kra-output/" > /dev/null 2>&1
#convert the extracted png into normal srgb file and copy it back to output folder
convert /tmp/kra-output/mergedimage.png -colorspace sRGB -background white -alpha remove -resize 40% -quality 95 "$cwd"/output-lowres/${f%.*}-lowres.jpg
convert /tmp/kra-output/mergedimage.png -colorspace sRGB -background white -alpha remove "$cwd"/output-hires/${f%.*}-hires.png
#remove the output image (need to find better way to do this)
rm /tmp/kra-output/mergedimage.png
done