Re: Cocoa Graphics Parsing
Re: Cocoa Graphics Parsing
- Subject: Re: Cocoa Graphics Parsing
- From: Graham Cox <email@hidden>
- Date: Tue, 21 Jul 2009 13:05:36 +1000
On 21/07/2009, at 12:25 PM, Courtney Arnold wrote:
I am expecting that I am going to have to drop down to lower levels.
I want to be able to manually parse an image of a UPC barcode. I
assume that the best way to do so would be to potentially examine
each single pixel.
any information that you provide, I would appreciate it.
Well, if you're looking for -getBarcode: from NSImage, you're
obviously out of luck.
All you can do is scan the pixels, that's all that's in there, NSImage
and NSImageRep do not interpret the content beyond pixels. However,
you could do this by subclassing NSImageRep (or NSBitmapImageRep) and
adding methods that do interpret barcodes at this level. You still
have to do the work but this approach would give you a nice high-level
interface to it.
Internally, you have -getPixel:atX:y: which would presumably be the
workhorse at the heart of your class.
--Graham
_______________________________________________
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