• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Decoding images in PDF files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decoding images in PDF files


  • Subject: Re: Decoding images in PDF files
  • From: Wim Lewis <email@hidden>
  • Date: Mon, 26 Aug 2013 11:14:36 -0700

On 26 Aug 2013, at 10:49 AM, Graham Cox wrote:
> I'm working on a parser that needs to be able to extract graphics from PDF files. So far, I'm making good headway with the CGPDFxxx functions.
>
> I have a question about extracting embedded bitmap images. When I encounter an XObject stream with subType /Image, I get a bunch of parameters that looks pretty close to the parameters to CGImageCreate. However, the 'Filter' parameter indicates /FlateDecode so I'm assuming that I can't just wrap the stream in a CFDataRef and then in a CFDataProvider - I'll need to actually decompress this data first using (according to PDF spec) zlib/deflate.

As I understand it, that's correct. You may also be able to wrap the compressed data in a container such as PNG, if there's a container that can use the same compression parameters, and hand it off to CGImage for decompression (I never got around to trying this but it seems like it would work in some cases, esp. DCTDecode -> JFIF).



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Decoding images in PDF files (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: handleGetURLEvent getting called after applicationDidFinishLaunching
  • Next by Date: Re: Decoding images in PDF files
  • Previous by thread: Re: Decoding images in PDF files
  • Next by thread: Cocoa + Automator : service to generate text files not working
  • Index(es):
    • Date
    • Thread