문제

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.
도움이 되었습니까?

해결책

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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top