BW-TIF to BW-JP2 conversion
Posted: 2016-05-26T08:32:46-07:00
I am converting Black-White-TIF images to Black-White-JP2 images.Version: ImageMagick 6.9.4-1 Q16 x86_64 2016-05-17 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib freetype jng jp2 jpeg lcms ltdl lzma png tiff webp wmf xml zlib
The JP2 files are part of a PDF which I upload to Amazon/Createspace. But the JP2 images always appear to be completely black in the Createspace preview. Locally, these invalid JP2 files show a gray background in GIMP ... but not in the PDF-viewer Preview.
I get around this problem by converting TIF to JPG to JP2. In this case, the valid JP2 files are way too large.
I compared the invalid JP2 images with the valid JP2 images using "identify -verbose", trying to spot the problem. I tried everything from changing the colorspace, normalizing, thresholding, changing the alpha colors and removing the alpha channel.
Could you help me out?
Input
https://drive.google.com/file/d/0BxivpP ... sp=sharing
Result Invalid
Code: Select all
convert input.tif resut_not_ok.jp2
Result Valid
Code: Select all
convert input.tif tmp.jpg
convert tmp.jpg -monochrome result_ok.jp2
https://drive.google.com/file/d/0BxivpP ... sp=sharing
JP2
https://drive.google.com/file/d/0BxivpP ... sp=sharing