You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when processing paletted images, we first prepare a palette color buffer of maximum size (PNG_MAX_PALETTE_LENGTH, 256), then we query the file to populate the buffer and finally we resize the buffer to match the number of the color entries in the file. As @t-bltg noted (#47 (comment)), there is a way to know the palette length before populating the buffer, in which case we could simply create the buffer of the correct size.
IIUC, to be able to get the palette length early, one has to use libpng transformation (see the comment referenced above), so we need to figure out how to do it and whether it's beneficial in terms of performance.
The text was updated successfully, but these errors were encountered:
Currently, when processing paletted images, we first prepare a palette color buffer of maximum size (
PNG_MAX_PALETTE_LENGTH
, 256), then we query the file to populate the buffer and finally we resize the buffer to match the number of the color entries in the file. As @t-bltg noted (#47 (comment)), there is a way to know the palette length before populating the buffer, in which case we could simply create the buffer of the correct size.IIUC, to be able to get the palette length early, one has to use libpng transformation (see the comment referenced above), so we need to figure out how to do it and whether it's beneficial in terms of performance.
The text was updated successfully, but these errors were encountered: