source: trunk/dports/devel/libsdl_image/files/IMG_ImageIO.m.patch @ 148198

Last change on this file since 148198 was 148198, checked in by jmr@…, 3 years ago

libsdl_image: apply upstream patch to remove incorrect use of CGColorSpace APIs (#37453). Also disable ImageIO support on 10.5 since it is unable to load some images (#38012).

File size: 894 bytes
  • IMG_ImageIO.m

    old new static SDL_Surface* Create_SDL_Surface_F 
    212212    CGContextRef bitmap_context;
    213213    CGBitmapInfo bitmap_info;
    214214
    215         /* This sets up a color space that results in identical values
    216          * as the image data itself, which is the same as the standalone
    217          * libpng loader.
    218          * Thanks to Allegro. :)
    219          */
    220         CGFloat whitePoint[3] = { 1, 1, 1 };
    221         CGFloat blackPoint[3] = { 0, 0, 0 };
    222         CGFloat gamma[3] = { 2.2, 2.2, 2.2 };
    223         CGFloat matrix[9] = {
    224                 1, 1, 1,
    225                 1, 1, 1,
    226                 1, 1, 1
    227         };
    228         CGColorSpaceRef color_space =
    229                 CGColorSpaceCreateCalibratedRGB(
    230                                                                         whitePoint, blackPoint, gamma, matrix
    231                                                                         );   
     215        CGColorSpaceRef color_space = CGColorSpaceCreateDeviceRGB();
    232216       
    233217    if (alpha == kCGImageAlphaNone ||
    234218        alpha == kCGImageAlphaNoneSkipFirst ||
Note: See TracBrowser for help on using the repository browser.