VirtualBox

Ignore:
Timestamp:
Jan 16, 2025 1:09:46 PM (3 weeks ago)
Author:
vboxsync
Message:

libpng-1.6.45: Applied and adjusted our libpng changes to 1.6.45. bugref:8515

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/libpng-1.6.45/pngset.c

    r103316 r107813  
    1 
    21/* pngset.c - storage of image information into info struct
    32 *
    4  * Copyright (c) 2018-2024 Cosmin Truta
     3 * Copyright (c) 2018-2025 Cosmin Truta
    54 * Copyright (c) 1998-2018 Glenn Randers-Pehrson
    65 * Copyright (c) 1996-1997 Andreas Dilger
     
    135134#endif /* cHRM */
    136135
     136#ifdef PNG_cICP_SUPPORTED
     137void PNGAPI
     138png_set_cICP(png_const_structrp png_ptr, png_inforp info_ptr,
     139             png_byte colour_primaries, png_byte transfer_function,
     140             png_byte matrix_coefficients, png_byte video_full_range_flag)
     141{
     142   png_debug1(1, "in %s storage function", "cICP");
     143
     144   if (png_ptr == NULL || info_ptr == NULL)
     145      return;
     146
     147   info_ptr->cicp_colour_primaries = colour_primaries;
     148   info_ptr->cicp_transfer_function = transfer_function;
     149   info_ptr->cicp_matrix_coefficients = matrix_coefficients;
     150   info_ptr->cicp_video_full_range_flag = video_full_range_flag;
     151
     152   if (info_ptr->cicp_matrix_coefficients != 0)
     153   {
     154      png_warning(png_ptr, "Invalid cICP matrix coefficients");
     155      return;
     156   }
     157
     158   info_ptr->valid |= PNG_INFO_cICP;
     159}
     160#endif /* cICP */
     161
    137162#ifdef PNG_eXIf_SUPPORTED
    138163void PNGAPI
     
    13961421         98,  75,  71,  68, '\0',  /* bKGD */
    13971422         99,  72,  82,  77, '\0',  /* cHRM */
     1423         99,  73,  67,  80, '\0',  /* cICP */
    13981424        101,  88,  73, 102, '\0',  /* eXIf */
    13991425        103,  65,  77,  65, '\0',  /* gAMA */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette