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
In my application I have to use UPNG to compress a large quantity of images - specifically, given an ImageData, I need to reduce the colors to the provided value then output another ImageData. The way I'm currently doing this involves encoding the data as a PNG then decoding it again:
However, from some testing it appears the decoding of the PNG on the second line of the function creates a significant performance bottleneck. Is it possible to avoid creating a PNG in the first place so I don't have to decode it, and just reduce the number of colors of the raw pixel data and output that?
The text was updated successfully, but these errors were encountered:
In my application I have to use UPNG to compress a large quantity of images - specifically, given an
ImageData
, I need to reduce the colors to the provided value then output anotherImageData
. The way I'm currently doing this involves encoding the data as a PNG then decoding it again:However, from some testing it appears the decoding of the PNG on the second line of the function creates a significant performance bottleneck. Is it possible to avoid creating a PNG in the first place so I don't have to decode it, and just reduce the number of colors of the raw pixel data and output that?
The text was updated successfully, but these errors were encountered: