开发者

ColorMap in iPhone Core Graphics?

I have a monochrome image with 256 levels of grayscale. I want to map each level to a specific color and apply to the image to get a colored image as a result. How can I do it?

To be more precise here is the pair in Java 2D API that I need to find replacement for:

  • http://java.sun.com/javase/6/docs/api/java/awt/image/Lookup开发者_StackOverflow中文版Op.html
  • http://java.sun.com/javase/6/docs/api/java/awt/image/LookupTable.html

And here is the instruction of how it works in Java. I need to build the same under iPhone.

Thanks!


Looks to me like the kind of thing you'd want to do in a core image filter:

http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CoreImageFilterReference/Reference/reference.html

If there isn't a suitable one already there, it wouldn't be very tricky to write.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜