views:

35

answers:

1

Hi, I am on MAC OSX.

How to convert an gray scaled image to the RGB format. Can i use the CIFilters for converting? Or any other way

And also i want to reverse the operation. i.e., convert the RGB format to Gray scaled format.

Regards,
Dhanaraj.
+1  A: 

You can draw the grayscale image into an RGB-color context and export that image. Of course, the ability to draw a grayscale image into a non-grayscale context means you probably don't need to convert the image in the first place, since it will be done for you on-the-fly.

Core Image requires RGB images as input and produces them as output. I think it will convert a non-RGB image for you, so you could just use some simple filter in its identity configuration, but that's unnecessary.

What are you really trying to do that requires you to convert the image?

Peter Hosey
That didn't answer my question.
Peter Hosey