unity.webp icon indicating copy to clipboard operation
unity.webp copied to clipboard

Example4 error?

Open xiabob opened this issue 3 months ago • 0 comments

That is problem to using webp on unity.

Unity's texture need to flip updown.

To archive that flip like that

https://github.com/netpyoung/unity.webp/blob/76a58b03aadc57a3d9d22e21a04dd4bd83566136/unity_project/Assets/example4/EncodeToWebP.cs#L61

or using advanced config with WebPEncode API

https://developers.google.com/speed/webp/docs/api

Originally posted by @netpyoung in #25

Array.Copy(pixels, y * h, pixelsFlipped, (h - y - 1) * w, w); For the Array.Copycall inside the loop: I think there might be a small issue with the source array offset. Since we're copying a row of pixels (width w), the offset to the start of row yshould probably be y * w, not y * h.

xiabob avatar Oct 31 '25 07:10 xiabob