convertToSrgb

fun convertToSrgb(bitmap: KiteBitmap, profile: ColorProfile, intent: RenderingIntent = RenderingIntent.Perceptual): KiteBitmap(source)

bitmap converted to sRGB through profile with intent, as decode converts with ColorTarget.Srgb: for a bitmap decoded before, or one whose profile came from elsewhere, such as a PDF's ICCBased colour space. Every declaration of profile counts, in the order ColorProfile gives: an ICC profile, H.273 code points (HDR ones tone-mapped to SDR), and a PNG's sRGB, gAMA and cHRM. A gray profile reads the red channel. A profile this does not read, one that already is sRGB, a CMYK profile (whose ink convertCmykToSrgb takes), or a gray one with a bitmap that is not gray gives bitmap back.


fun convertToSrgb(bitmap: KiteBitmap16, profile: ColorProfile, intent: RenderingIntent = RenderingIntent.Perceptual): KiteBitmap16(source)

convertToSrgb at 16 bits a sample, at full precision.