I'm flipping between NSImage
and NSBitmapImageRep
(because only NSBitmapImageRep
lets me find-replace colors per-pixel, but only NSImage
s can be used in a NSImageView
/NSImageCell
's setImage
). I know how to convert a NSImage
to a NSBitmapImageRep
(using bitmap = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]
), but I can't do the opposite of that because TIFFRepresentation
is read-only. So, how do I convert a NSBitmapRep
to a NSImage
?
With hope,
radzo73
All that I had to do to get back an NSImage from my modified NSBitmapImageRep was call one method: