c++ decode CCITT encoded images in pdfs

痴心易碎 提交于 2020-01-13 11:39:07

问题


I'm trying to extract all images out of PDF files in C++. I'm stuck in decoding CCITT encoded images.

Does anyone know an opensourced code for this?

I use the ImageMagick Magick++ Library, is it possible to do the decoding with this library, too?

Thanks for your help!


回答1:


CCITT is one of the encodings TIFF supports, though in a PDF file the CCITT images are probably raw data.

You can convert a raw CCITT image into a Tiff image using Fax2Tiff. It should be easy enough to work with the image once it is encoded as a Tiff.

Fax2Tiff is part of LibTiff. See LibTiff Source




回答2:


Or you can append a header on it and treat it as a tiff file.



来源:https://stackoverflow.com/questions/4595646/c-decode-ccitt-encoded-images-in-pdfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!