On Thu, May 8, 2008 at 12:19 AM, David Wilson <[EMAIL PROTECTED]> wrote:
> On Wed, May 7, 2008 at 11:12 PM, Ben Einstein <[EMAIL PROTECTED]> > wrote: > > John's suggestion of getting rid of strlen was spot on; the code below > works > > extremely well if using [NSData length] a single time before the loop. > > > > What I'm still curious about is the difference in processing between > the > > NSImage and the zip archive. The same code and the same number of bytes > but > > orders of magnitude slower. > > > > Is there still a difference in processing speed after swapping to > using the length function? To be honest, I'm with John- the prior code > couldn't possibly have been working. I think it's likely that either > the images had a null byte very early in their data (not at all > surprising) and as such were doing almost no work According to /usr/share/file/magic, there's a byte flag at offset 18 that indicates the presence of thumbnail info. That flag will be 0 for any jpeg that doesn't have thumbnail info. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]