Hi
I'm working with an image that has the following pixel format:
Color type: ARGB (Alpha-Red-Green-Blue order)
Bits per component: 8
Bits per pixel: 32 (i.e., ARGB_8888)
In Skia, the closest SkColorType I found is kARGB_4444_SkColorType, but that only supports 4 bits per component.Does Skia provide a way to render or create images with the ARGB_8888 format? If not directly supported, what is the recommended approach to handle images in ARGB_8888 format? Should I manually convert the pixel layout to a Skia-supported format like kBGRA_8888_SkColorType before rendering?
auto imageInfo = SkImageInfo::Make(imgWidth, imgHeight ,colorType, alphaType);
SkPixmap pixmap(imageInfo,imageDataBuffer.get(),imgWidth*samplesPerPixel);
auto image = SkImages::RasterFromPixmap(pixmap,nullptr,nullptr);
canvas->drawImageRect(image,imageRect,SkSamplingOptions(SkSamplingOptions(SkFilterMode::kLinear,SkMipmapMode::kLinear)));
How to draw the images that are having colortypes that are unavailable in Skia's SkColorType enum?Any guidance would be appreciated.