Skip to content

Commit a21ca87

Browse files
committed
Add FIXME about color managament.
1 parent b949538 commit a21ca87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SDWebImageAVIFCoder/Classes/SDImageAVIFCoder.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,10 @@ - (nullable CGImageRef)sd_createAVIFImageWithData:(nonnull NSData *)data CF_RETU
842842
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, dest, rowBytes * height, FreeImageData);
843843
CGBitmapInfo bitmapInfo = usesU16 ? kCGBitmapByteOrder16Host : kCGBitmapByteOrderDefault;
844844
bitmapInfo |= hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNone;
845+
// FIXME: (ledyba-z): Set appropriate color space.
846+
// Currently, there is no way to get MatrixCoefficients, TransferCharacteristics and ColourPrimaries values
847+
// in Sequence Header OBU.
848+
// https://github.com/AOMediaCodec/libavif/blob/7d36984b2994210b/include/avif/avif.h#L149-L236
845849
CGColorSpaceRef colorSpaceRef = [SDImageCoderHelper colorSpaceGetDeviceRGB];
846850
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;
847851
CGImageRef imageRef = CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, rowBytes, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent);

0 commit comments

Comments
 (0)