|
|
@@ -33,7 +33,7 @@ namespace Pipi |
|
|
|
_picture = p; |
|
|
|
} |
|
|
|
|
|
|
|
[DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
[DllImport("libpipi-0.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
SuppressUnmanagedCodeSecurity] |
|
|
|
private static extern int pipi_free(IntPtr img); |
|
|
|
~Picture() |
|
|
@@ -41,7 +41,7 @@ namespace Pipi |
|
|
|
pipi_free(_picture); |
|
|
|
} |
|
|
|
|
|
|
|
[DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
[DllImport("libpipi-0.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
SuppressUnmanagedCodeSecurity] |
|
|
|
private static extern IntPtr pipi_load(string s); |
|
|
|
public static Picture Load(string s) |
|
|
@@ -55,7 +55,7 @@ namespace Pipi |
|
|
|
return ret; |
|
|
|
} |
|
|
|
|
|
|
|
[DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
[DllImport("libpipi-0.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
SuppressUnmanagedCodeSecurity] |
|
|
|
private static extern int pipi_save(IntPtr p, string s); |
|
|
|
public int Save(string s) |
|
|
@@ -63,7 +63,7 @@ namespace Pipi |
|
|
|
return pipi_save(_picture, s); |
|
|
|
} |
|
|
|
|
|
|
|
[DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
[DllImport("libpipi-0.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
SuppressUnmanagedCodeSecurity] |
|
|
|
private static extern int pipi_get_image_width(IntPtr img); |
|
|
|
public int Width |
|
|
@@ -71,7 +71,7 @@ namespace Pipi |
|
|
|
get { return pipi_get_image_width(_picture); } |
|
|
|
} |
|
|
|
|
|
|
|
[DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
[DllImport("libpipi-0.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
SuppressUnmanagedCodeSecurity] |
|
|
|
private static extern int pipi_get_image_height(IntPtr img); |
|
|
|
public int Height |
|
|
@@ -87,7 +87,7 @@ namespace Pipi |
|
|
|
public Int64 bytes; |
|
|
|
} |
|
|
|
|
|
|
|
[DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
[DllImport("libpipi-0.dll", CallingConvention=CallingConvention.Cdecl), |
|
|
|
SuppressUnmanagedCodeSecurity] |
|
|
|
private static extern IntPtr pipi_getpixels(IntPtr img, int type); |
|
|
|
public byte[] GetPixels(int w, int h, int x, int y) |
|
|
|