Encode images with DCTDecode (JPEG) in PDFs if it makes sense. Fallback to FlateDecod...
authoredisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 24 Apr 2013 13:01:01 +0000 (13:01 +0000)
committeredisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 24 Apr 2013 13:01:01 +0000 (13:01 +0000)
commitd9dfa18372119c8e1318125d2075fa80e0819094
tree1a4a321c54972e86cf5bec762839145a01f028dd
parent6238c57c8dd8ddc14ca778017a0c43ba773b744f
Encode images with DCTDecode (JPEG) in PDFs if it makes sense. Fallback to FlateDecode (zip) if it makes sense. Otherewise include uncompressed stream.
This change will reduce the size of PDFs to 50% (in the case of the existing SKPs, we reduce the total size of PDFs from 105MB to 50MB)
Review URL: https://codereview.appspot.com/7068055

git-svn-id: http://skia.googlecode.com/svn/trunk@8835 2bbb7eff-a529-9590-31e7-b0007b416f81
13 files changed:
gm/gmmain.cpp
gyp/pdf.gyp
include/pdf/SkPDFDevice.h
src/pdf/SkPDFDevice.cpp
src/pdf/SkPDFImage.cpp
src/pdf/SkPDFImage.h
src/pdf/SkPDFImageStream.cpp [new file with mode: 0644]
src/pdf/SkPDFImageStream.h [new file with mode: 0644]
src/pdf/SkPDFStream.h
tests/PDFPrimitivesTest.cpp
tools/PdfRenderer.cpp
tools/PdfRenderer.h
tools/render_pdfs_main.cpp