imazen / libwebp-net Goto Github PK
View Code? Open in Web Editor NEWA .NET wrapper for libwebp
License: MIT License
A .NET wrapper for libwebp
License: MIT License
Got this working in development fine... however when I deploy it (An Asp.Net MVC Framework app) I cannot get it to work. Worse yet it does not generate any exceptions but simply outputs an empty 0kb file! I could not install VS 2015 C++ Redistributable as I already have VS 2017 C++ Redistributable. I also put the 32 and 64 bit versions in the corresponding locations i.e. System32 and SysWow64 which worked in dev. Am I missing something else? Any help would be greatly appreciated.
Also note that I am running on Windows Server 2019 thanks.
Google announced this today: http://blog.chromium.org/2014/03/webp-improves-while-rolling-out-across.html
Hi,
I realize this propably isn't your priority but using this lib on non windows systems utilizing mono fails at the moment. This is due to the fact that WebPFree is a method injected solely through the makefile for the (windows) dll version of the lib.
A good replacement would be WebPSafeFree (utils.h) which provides this function for all systems from 0.4.1 upwards.
Also providing an MSIL version of the package on NuGet (and tagging the repository with the nuget releases) would be a blast :)
I use this library for WEBP image but my problem is, this library use x86 DLL all the time and it does not use x64 and because of this my solution CPU configuration is set to any CPU and I can't use all my hardware source, can any one help me?
The calling convention is defaulting to stdcall, it needs to be cdecl. This is causing stack corruption.
We can convert the output to Stream... but why not the something for input?
It is really inconvenient to have to convert the input to Bitmap.
It crashes on indexed images. I believe the issue lies here in Encode(Bitmap b, float quality, out IntPtr result, out long length)
using (Bitmap b2 = b.Clone(new Rectangle(0, 0, b.Width, b.Height), System.Drawing.Imaging.PixelFormat.Format32bppArgb))
{
Encode(b2, quality, out result, out length);
}
I've created a workaround that works nicely which is
if (b.PixelFormat.HasFlag(PixelFormat.Indexed))
{
using (var bitmap = new Bitmap(b.Width, b.Height, PixelFormat.Format32bppArgb))
{
using (var graphics = Graphics.FromImage(bitmap))
{
graphics.DrawImageUnscaled(b, 0, 0, b.Width, b.Height);
}
//this is using the stream to. it would have to be revised to reflect your out params
Encode(bitmap, to, quality);
}
}
I noticed the NuGet package is from over a year ago. What needs to happen to get it updated?
Hi,
Do not have information about project page (www.github.com/imazen/libwebp-net) on Nuget page (www.nuget.org/packages/Imazen.WebP)
Nothing in version 10.0.1 and 9.0.1
Have spent some hours to see the 'unable to load libwebp.dll or one of its dependencies' when using libwebp-net from NuGet.
However the project works like a champ when I add the repo as submodule and simply add Imazen.WebP as project reference.
Hello,
I need to use the Imazen.WebP library inside a windows service project. Therefor it needs a strong name. Even if I manage to strong name the Imazen.WebP.dll the initialization fails with:
System.IO.FileLoadException: The File or Assembly "Imazen.WebP, Version=9.0.1.0, Culture=neutral, PublicKeyToken=null" or dependency could not be found. A strong named assembly is required. (Exception HRESULT: 0x80131044)
I think this is because the libwebp.dll is not signed / strong named. Is it possible to use the library in such context?
I can losslessly encode an image without an alpha channel, but when decoding the data is misaligned.
The encoder specifies the data format, but the decoder always uses BGRA
I think the problem might be due to supplying PixelFormat32... to encoding methods that expect 24bits per pixel, because I noticed that a non-alpha compression is larger than a compression with an alpha channel.
Is this lib anycpu (this is, does it load automatically the proper dll according to the arquitecture)?
Also, do the dlls require some specific version of visual c++ runtimes?
can you post the updates, looks like the nuget has updated several times since
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.