JosePineiro / WebP-wrapper

Wrapper for libwebp in C#. The most complete wapper in pure managed C#. Exposes Simple Decoding API, Simple Encoding API, Advanced Encoding API (with stadistis of compresion), Get version library and WebPGetFeatures (info of any WebP file). In the future I´ll update for expose Advanced Decoding API. The wapper are in safe managed code in one class. No need external dll except libwebp.dll (included). The wapper work in 32 and 64 bit system.
MIT License
214 stars 48 forks source link

Webp decode to Stream #30

Closed Maverich55 closed 3 years ago

Maverich55 commented 3 years ago

WebP webp = new WebP();

string pathFileName = openFileDialog.FileName; //decode to byte[] byte[] rawWebp = File.ReadAllBytes(pathFileName); webp.GetInfo(rawWebp, out width, out height, out has_alpha, out has_animation, out format);

//is possible ? MemoryStream ms = new MemoryStream(rawWebp);