diff --git a/src/ImageProcessor/Configuration/NativeBinaryFactory.cs b/src/ImageProcessor/Configuration/NativeBinaryFactory.cs index 5db7a3715..741da61e2 100644 --- a/src/ImageProcessor/Configuration/NativeBinaryFactory.cs +++ b/src/ImageProcessor/Configuration/NativeBinaryFactory.cs @@ -94,7 +94,7 @@ namespace ImageProcessor.Configuration Assembly assembly = Assembly.GetExecutingAssembly(); string targetBasePath = new Uri(assembly.Location).LocalPath; string targetPath = Path.GetFullPath(Path.Combine(targetBasePath, "..\\" + folder + "\\" + name)); - + // Copy the file across if necessary. FileInfo fileInfo = new FileInfo(targetPath); bool rewrite = true; diff --git a/src/ImageProcessor/Configuration/NativeMethods.cs b/src/ImageProcessor/Configuration/NativeMethods.cs index ea2aa1aa9..a20b5a86f 100644 --- a/src/ImageProcessor/Configuration/NativeMethods.cs +++ b/src/ImageProcessor/Configuration/NativeMethods.cs @@ -27,7 +27,7 @@ namespace ImageProcessor.Configuration /// an executable module. /// /// If the function succeeds, the return value is a handle to the module; otherwise null. - [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] + [DllImport("kernel32", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr LoadLibrary(string libname); /// @@ -38,7 +38,7 @@ namespace ImageProcessor.Configuration /// A handle to the loaded library module. /// The LoadLibrary, LoadLibraryEx, GetModuleHandle, or GetModuleHandleEx function returns this handle. /// If the function succeeds, the return value is nonzero; otherwise zero. - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + [DllImport("kernel32", CharSet = CharSet.Auto)] public static extern bool FreeLibrary(IntPtr hModule); } } diff --git a/src/ImageProcessor/ImageFactory.cs b/src/ImageProcessor/ImageFactory.cs index 7e37983c3..29b64cc22 100644 --- a/src/ImageProcessor/ImageFactory.cs +++ b/src/ImageProcessor/ImageFactory.cs @@ -241,11 +241,11 @@ namespace ImageProcessor if (this.ShouldProcess) { // Set our new image as the memory stream value. - #if !__MonoCS__ +#if !__MonoCS__ Image newImage = Image.FromStream(this.InputStream, true); - #else +#else Image newImage = Image.FromStream(this.InputStream); - #endif +#endif // Dispose and reassign the image. this.Image.Dispose(); diff --git a/src/ImageProcessor/Imaging/Formats/GifFormat.cs b/src/ImageProcessor/Imaging/Formats/GifFormat.cs index dffccb99b..83904225b 100644 --- a/src/ImageProcessor/Imaging/Formats/GifFormat.cs +++ b/src/ImageProcessor/Imaging/Formats/GifFormat.cs @@ -86,7 +86,7 @@ namespace ImageProcessor.Imaging.Formats foreach (GifFrame frame in info.GifFrames) { factory.Image = frame.Image; - frame.Image = quantizer.Quantize(processor.Invoke(factory)); + frame.Image = quantizer.Quantize(processor.Invoke(factory)); encoder.AddFrame(frame); } } diff --git a/src/ImageProcessor/Imaging/Formats/NativeMethods.cs b/src/ImageProcessor/Imaging/Formats/NativeMethods.cs index b6cb76450..0c42710b0 100644 --- a/src/ImageProcessor/Imaging/Formats/NativeMethods.cs +++ b/src/ImageProcessor/Imaging/Formats/NativeMethods.cs @@ -66,7 +66,7 @@ namespace ImageProcessor.Imaging.Formats /// /// 1 if success, otherwise error code returned in the case of (a) formatting error(s). /// - [DllImport("libwebp.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPGetInfo")] + [DllImport("libwebp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPGetInfo")] public static extern int WebPGetInfo(IntPtr data, uint dataSize, out int width, out int height); /// @@ -90,7 +90,7 @@ namespace ImageProcessor.Imaging.Formats /// /// output_buffer if function succeeds; NULL otherwise /// - [DllImport("libwebp.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPDecodeBGRAInto")] + [DllImport("libwebp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPDecodeBGRAInto")] public static extern IntPtr WebPDecodeBGRAInto(IntPtr data, uint dataSize, IntPtr outputBuffer, int outputBufferSize, int outputStride); /// @@ -117,7 +117,7 @@ namespace ImageProcessor.Imaging.Formats /// /// Size of WebP Image /// - [DllImport("libwebp.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPEncodeBGRA")] + [DllImport("libwebp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPEncodeBGRA")] public static extern int WebPEncodeBGRA(IntPtr rgb, int width, int height, int stride, float qualityFactor, out IntPtr output); /// @@ -129,7 +129,7 @@ namespace ImageProcessor.Imaging.Formats /// /// 1 if success, otherwise error code returned in the case of (a) error(s). /// - [DllImport("libwebp.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPFree")] + [DllImport("libwebp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPFree")] public static extern int WebPFree(IntPtr pointer); #endregion } diff --git a/src/ImageProcessorConsole/images/output/120430.gif b/src/ImageProcessorConsole/images/output/120430.gif new file mode 100644 index 000000000..4064835ef Binary files /dev/null and b/src/ImageProcessorConsole/images/output/120430.gif differ diff --git a/src/ImageProcessorConsole/images/output/4.sm.webp b/src/ImageProcessorConsole/images/output/4.sm.webp deleted file mode 100644 index 90a630864..000000000 Binary files a/src/ImageProcessorConsole/images/output/4.sm.webp and /dev/null differ diff --git a/src/ImageProcessorConsole/images/output/Tl4Yb.gif b/src/ImageProcessorConsole/images/output/Tl4Yb.gif new file mode 100644 index 000000000..8539339c9 Binary files /dev/null and b/src/ImageProcessorConsole/images/output/Tl4Yb.gif differ diff --git a/src/ImageProcessorConsole/images/output/nLpfllv.gif b/src/ImageProcessorConsole/images/output/nLpfllv.gif new file mode 100644 index 000000000..908147539 Binary files /dev/null and b/src/ImageProcessorConsole/images/output/nLpfllv.gif differ diff --git a/src/ImageProcessorConsole/images/output/test.webp b/src/ImageProcessorConsole/images/output/test.webp deleted file mode 100644 index 549fb9c6b..000000000 Binary files a/src/ImageProcessorConsole/images/output/test.webp and /dev/null differ