• 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: Faster way to test pixels?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faster way to test pixels?


  • Subject: Re: Faster way to test pixels?
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 25 May 2008 09:58:46 -0700


On 25 May '08, at 8:14 AM, Steve Christensen wrote:

Unless you know for a fact that your bitmap data is packed such that each row begins immediately after the previous row, you'll need to do a bit more work. Bitmaps can be created with [bits bytesPerRow] > bytesPerPixel * [bits pixelsWide]. In that case you could have some uninitialized bytes between the end of one row and the beginning of the next, which could affect the outcome of your test.

I agree — I've been burned by this in the past. RowBytes often seems to get rounded up to multiples of a power of 2, such as 8 or 16, probably for better cache coherency or because GPUs are optimized for it.


—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Faster way to test pixels? (From: Graham Cox <email@hidden>)
 >Re: Faster way to test pixels? (From: Jens Alfke <email@hidden>)
 >Re: Faster way to test pixels? (From: Graham Cox <email@hidden>)
 >Re: Faster way to test pixels? (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: How to Delay, Wait, Pause...
  • Next by Date: Re: File's Owner
  • Previous by thread: Re: Faster way to test pixels?
  • Next by thread: Re: Faster way to test pixels?
  • Index(es):
    • Date
    • Thread