• 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: [NSBitmapImageRep getBitmapDataPlanes] copying data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?


  • Subject: Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 21 Feb 2011 17:49:19 -0600

On Feb 21, 2011, at 5:07 PM, Jonathan Taylor wrote:

> So as far as my situation goes, what I'm after is an efficient way of starting from a path to some sort of raster image and obtaining a raw pixel buffer I can read. [Obviously if actually reading from disk then the disk will be the bottleneck, but it's often in the disk cache, in which case the extra data copy associated with [NSBitmapImageRep getBitmapDataPlanes] is a problem. I was rather liking the file-format-agnostic abilities of initWithContentsOfFile. Any thoughts?

What makes you think the data copy is "extra"?

If you read that AppKit release note, you'll see that NSImage may not be decoding the file contents right off the bat.  For example, it mentions that "[i]f you initialize a NSImage from a JPEG file, then draw it in a PDF, you should get a PDF of the same file size as the original JPEG".  In other words, NSImage is keeping the image data in its original JPEG-compressed format, not as a rasterized bitmap.

So, you may be seeing the one necessary/required data copy during decoding of the image, not anything extra.

Regards,
Ken

_______________________________________________

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

  • Follow-Ups:
    • Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
      • From: Jonathan Taylor <email@hidden>
    • Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
      • From: Ken Ferry <email@hidden>
References: 
 >[NSBitmapImageRep getBitmapDataPlanes] copying data? (From: Jonathan Taylor <email@hidden>)
 >Re: [NSBitmapImageRep getBitmapDataPlanes] copying data? (From: Quincey Morris <email@hidden>)
 >Re: [NSBitmapImageRep getBitmapDataPlanes] copying data? (From: Jonny Taylor <email@hidden>)
 >Re: [NSBitmapImageRep getBitmapDataPlanes] copying data? (From: Quincey Morris <email@hidden>)
 >Re: [NSBitmapImageRep getBitmapDataPlanes] copying data? (From: Jonathan Taylor <email@hidden>)
 >Re: [NSBitmapImageRep getBitmapDataPlanes] copying data? (From: Quincey Morris <email@hidden>)
 >Re: [NSBitmapImageRep getBitmapDataPlanes] copying data? (From: "Sean McBride" <email@hidden>)
 >Re: [NSBitmapImageRep getBitmapDataPlanes] copying data? (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
  • Next by Date: Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
  • Previous by thread: Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
  • Next by thread: Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
  • Index(es):
    • Date
    • Thread