ios - How do I create an RGB CIImage from 3 8-bit gray images? -
i have 3 ciimage
objects gray 8-bpp images meant 8-bit r, g, , b channels of new image. aside low-level image pixel data operations, there way construct ciimage
(from filters or other easier way)
i realize can looping through pixels of new rgb image , setting gray channels have -- wondering if there more idiomatic way work channels.
for example, in pillow python, it's image.merge([rchannel, gchannel, bchannel])
-- know how code pixel access way if there no built in way.
the book, core image swift, covers how , provides code here:
the basic idea need provide color kernel function in gpu shader language , wrap in cifilter subclass.
note: code not copied here because it's under gpl, incompatible license stackoverflow answers. can follow link if want see how it's done, , use if it's compatible license.
Comments
Post a Comment