Tulon wrote:Even though that's not optimal, the result should still look fine.
Hmm... yes. My concern was how it might affect compression efficiency, but the more I think about it the less I think it would even make a difference. I still plan to test things out on a full color image, just to double check.
Thank you for mentioning csepdjvu... probably would have spent half the night wondering how to merge two separate encodings into one page without that hint. I've worked out a script that works on a test image (attached). Long story short is a decrease from 43.7 kB (tif -> ppm -> cpaldjvu) to 11.6 kB for the test image.
- Code: Select all
convert -opaque black sample.tif sample_graphics.tif
convert +opaque black sample.tif sample_textual.tif
cjb2 sample_textual.tif temp_textual.djvu
ddjvu -format=rle -v temp_textual.djvu temp_textual.rle
convert sample_graphics.tif temp_graphics.ppm
cat temp_textual.rle temp_graphics.ppm > temp.mix
csepdjvu -vv temp.mix out.djvu
rm sample_* temp*
So it looks like I can get that feature done in the very near future. Just gotta relearn how to make debian packages before I go back to working on the code.