How can I set color for image by using SfImageEditor?

Hi,

I'm creating a page that allows user can edit image by using  SfImageEditor.

How can I change the color of an image from RGB to Grayscale of CMYK and vise versa?

Or if you have any ideas for the requirement, please tell me?

Thanks and regards,

TH


1 Reply

VO Vishal Omprasad Syncfusion Team September 6, 2024 12:47 PM UTC

Hi Thanh,

Your requirement to change the color of the image from RGB to Grayscale can be achieved at sample level by using an external image processing library (eg: SkiaSharp). You can load the image in the image processing library, process the image by applying a pixel-by-pixel manipulation to convert it to grayscale, and then reload the processed image into the SfImageEditor.

We have prepared a sample demonstrating this process and attached it below for your reference. In the sample, we load an image into the SfImageEditor initially and in the Button.Clicked event we convert it to grayscale using SkiaSharp. Please check the attached sample and let us know whether it meets your requirement.

If you have any further questions or require assistance with any other aspect, please don't hesitate to let us know. We are here to help.

Regards,
Vishal O.


Attachment: ImageEditorGrayScale_9877dc85.zip

Loader.
Up arrow icon