Skip to content

Commit aa4baf0

Browse files
authored
Merge pull request #10 from SDWebImage/bugfix/bitmap_info
Fix the wrong byte order flag which cause failure on iOS 15+
2 parents 68369b5 + 4d72865 commit aa4baf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SDWebImageBPGCoder/Classes/SDImageBPGCoder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ - (nullable CGImageRef)sd_createBPGImageWithContext:(nonnull BPGDecoderContext *
432432
size_t bitsPerPixel = hasAlpha ? 32 : 24;
433433
size_t bytesPerRow = width * bitsPerPixel / 8;
434434
size_t rgbaSize = height * bytesPerRow;
435-
CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Big;
435+
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault;
436436
bitmapInfo |= hasAlpha ? kCGImageAlphaLast : kCGImageAlphaNone;
437437

438438
uint8_t *rgba = malloc(rgbaSize);

0 commit comments

Comments
 (0)