I have an image with tiles that I am splitting up and creating individual tiles with.
However, these images typically contain completely blank areas (tiles in this case) that I wish to exclude. These areas are completely transparent.
Now, how do I go about detecting them? Could read the tile pixel by pixel, by way of NSBitmapImageRep
but that doesn't sound very efficient.
So what is the best way of testing the transparency of the tile (they are cropped to a CGImageRef
, then converted to an NSImage
- if that helps)