netpyoung / unity.webp

:art: WebP made easy for Unity3d
https://netpyoung.github.io/unity.webp/
MIT License
237 stars 28 forks source link

Animated WebP image issue using LoadTexturesAsync #63

Open dw8869 opened 4 months ago

dw8869 commented 4 months ago

using unity.webp 0.3.11

Due to our application scenario, asynchronous loading is required. There is an issue of image output when you call the method below and use it.

WebP.Experiment.Animation.WebP.LoadTexturesAsync(byte[])

We tested 3 images.

There is a problem with the pixel looking broken as shown in the screenshot below. image

And the error log below is also output. [WebPDecoderWrapper] Bytes to texture error: LoadRawTextureData: not enough data provided (will result in overread).

netpyoung commented 3 months ago

I also have same problem of that. There is something what I can't understand when passing decoding option. So please avoid to use Experiment that function.

dw8869 commented 3 months ago

@netpyoung As I checked, the WebPDemuxGetFrame function returns the width and height values abnormally.

netpyoung commented 3 months ago

@dw8869

It seems so. WebP.Experiment.Animation.WebPDecoderWrapper.CreateDecoder couldn't create proper decoder. I also tried to modify to change decoder's behaviour via options but failed until now.

dw8869 commented 1 month ago

any updates?