Browse Source

Removing dllimport extensions

Former-commit-id: 559719fcdc77247885eb1b4f3baf97ad24f2bc07
af/merge-core
James South 12 years ago
parent
commit
46ea2e4124
  1. 2
      src/ImageProcessor/Configuration/NativeBinaryFactory.cs
  2. 4
      src/ImageProcessor/Configuration/NativeMethods.cs
  3. 6
      src/ImageProcessor/ImageFactory.cs
  4. 2
      src/ImageProcessor/Imaging/Formats/GifFormat.cs
  5. 8
      src/ImageProcessor/Imaging/Formats/NativeMethods.cs
  6. 3
      src/ImageProcessorConsole/images/output/120430.gif
  7. 3
      src/ImageProcessorConsole/images/output/4.sm.webp
  8. 3
      src/ImageProcessorConsole/images/output/Tl4Yb.gif
  9. 3
      src/ImageProcessorConsole/images/output/nLpfllv.gif
  10. 3
      src/ImageProcessorConsole/images/output/test.webp

2
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;

4
src/ImageProcessor/Configuration/NativeMethods.cs

@ -27,7 +27,7 @@ namespace ImageProcessor.Configuration
/// an executable module.
/// </param>
/// <returns>If the function succeeds, the return value is a handle to the module; otherwise null.</returns>
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[DllImport("kernel32", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr LoadLibrary(string libname);
/// <summary>
@ -38,7 +38,7 @@ namespace ImageProcessor.Configuration
/// <param name="hModule">A handle to the loaded library module.
/// The LoadLibrary, LoadLibraryEx, GetModuleHandle, or GetModuleHandleEx function returns this handle.</param>
/// <returns>If the function succeeds, the return value is nonzero; otherwise zero.</returns>
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
[DllImport("kernel32", CharSet = CharSet.Auto)]
public static extern bool FreeLibrary(IntPtr hModule);
}
}

6
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();

2
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);
}
}

8
src/ImageProcessor/Imaging/Formats/NativeMethods.cs

@ -66,7 +66,7 @@ namespace ImageProcessor.Imaging.Formats
/// <returns>
/// 1 if success, otherwise error code returned in the case of (a) formatting error(s).
/// </returns>
[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);
/// <summary>
@ -90,7 +90,7 @@ namespace ImageProcessor.Imaging.Formats
/// <returns>
/// output_buffer if function succeeds; NULL otherwise
/// </returns>
[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);
/// <summary>
@ -117,7 +117,7 @@ namespace ImageProcessor.Imaging.Formats
/// <returns>
/// Size of WebP Image
/// </returns>
[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);
/// <summary>
@ -129,7 +129,7 @@ namespace ImageProcessor.Imaging.Formats
/// <returns>
/// 1 if success, otherwise error code returned in the case of (a) error(s).
/// </returns>
[DllImport("libwebp.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPFree")]
[DllImport("libwebp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "WebPFree")]
public static extern int WebPFree(IntPtr pointer);
#endregion
}

3
src/ImageProcessorConsole/images/output/120430.gif

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:896b26b0129a335a91a5f8820ef9c5bc036dd60fae64690c0f8d281ca97bbc8d
size 8581

3
src/ImageProcessorConsole/images/output/4.sm.webp

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc9ccd29734ed06d2916389cc363955924f4bbb200fea91c113ae2b9334eca1f
size 12162

3
src/ImageProcessorConsole/images/output/Tl4Yb.gif

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e47e2ea079ce001c59cab3f7c3801d86b270d752d4399fd35779fb0e5ec9473
size 12875

3
src/ImageProcessorConsole/images/output/nLpfllv.gif

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a06d1e40bfed07eaaf26e416be8abdec8b762e744cde4123e1606e0c89d33cb0
size 18930

3
src/ImageProcessorConsole/images/output/test.webp

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b41b4fe144f9d3eaee706b516021efc7abc598f17655d9592866963bfa62f3ad
size 5590
Loading…
Cancel
Save