public void Dispose() { if (nativeImage != IntPtr.Zero) { GdiPlus.GdipDisposeImage(nativeImage); nativeImage = null; } }
internal static extern GpStatus GdipImageGetFrameDimensionsList(GpImage image, Guid[] dimensionIDs, uint count);
internal static extern GpStatus GdipSaveImageToFile(GpImage image, string filename, ref Guid clsidEncoder, EncoderParameters encoderParams);
internal static extern GpStatus GdipCloneImage(GpImage image, out GpImage cloneImage);
internal static extern GpStatus GdipDrawImageRectI(GpGraphics graphics, GpImage image, int x, int y, int width, int height);
internal static extern GpStatus GdipGetImageBounds(GpImage image, out RectangleF srcRect, out Unit srcUnit);
internal static extern GpStatus GdipDrawImagePointRect(GpGraphics graphics, GpImage image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, Unit srcUnit);
GdipGetImageBounds(GpImage image, byte[] srcRect, Unit srcUnit);
GdipGetImageDimension(GpImage image, out float width, out float height);
GdipGetImageBounds(GpImage image, out RectangleF srcRect, out Unit srcUnit);
GdipGetImageBounds(GpImage image, float[] srcRect, Unit srcUnit);
GdipGetImageGraphicsContext(GpImage image, out GpGraphics graphics);
GdipSaveAddImage(GpImage image, GpImage newImage, EncoderParameters encoderParams);
GdipSaveAdd(GpImage image, EncoderParameters encoderParams);
internal static extern GpStatus GdipImageSelectActiveFrame(GpImage image, ref Guid dimensionID, uint frameIndex);
GdipGetImageType(GpImage image, out ImageType type);
internal static extern GpStatus GdipLoadImageFromStream(IStream stream, out GpImage image);
GdipGetImageWidth(GpImage image, out uint width);
internal static extern GpStatus GdipDrawImage(GpGraphics graphics, GpImage image, float x, float y);
GdipGetImageHeight(GpImage image, out uint height);
internal static extern GpStatus GdipDrawImagePointsRectI(GpGraphics graphics, GpImage image, Point[] points, int count, int srcx, int srcy, int srcwidth, int srcheight, Unit srcUnit, GpImageAttributes imageAttributes, IntPtr callback, IntPtr callbackData);
internal void SetNativeImage(GpImage nativeImage) { this.nativeImage = nativeImage; }
internal static extern GpStatus GdipGetEncoderParameterList(GpImage image, ref Guid clsidEncoder, uint size, EncoderParameters buffer);
internal static extern GpStatus GdipDisposeImage(GpImage image);
GdipGetImageHorizontalResolution(GpImage image, out float resolution);
GdipDrawImagePointsRectI(GpGraphics graphics, GpImage image, Point[] points, int count, int srcx, int srcy, int srcwidth, int srcheight, Unit srcUnit, GpImageAttributes imageAttributes, IntPtr callback, IntPtr callbackData);
internal ImagePlus(GpImage nativeImage, GpStatus status) { SetNativeImage(nativeImage); }
GdipGetImageVerticalResolution(GpImage image, out float resolution);
internal static extern GpStatus GdipImageGetFrameCount(GpImage image, ref Guid dimensionID, out uint count);
GdipGetImageFlags(GpImage image, out uint flags);
internal static extern GpStatus GdipImageGetFrameDimensionsCount(GpImage image, out uint count);
GdipGetImageRawFormat(GpImage image, out Guid format);
internal static extern GpStatus GdipImageRotateFlip(GpImage image, RotateFlipType rfType);
GdipGetImagePixelFormat(GpImage image, out PixelFormat format);
internal static extern GpStatus GdipLoadImageFromFile([MarshalAs(UnmanagedType.BStr)]string filename, out GpImage image);
GdipGetImageThumbnail(GpImage image, uint thumbWidth, uint thumbHeight, out GpImage thumbImage, IntPtr /*GetThumbnailImageAbort*/ callback, IntPtr callbackData);
internal static extern GpStatus GdipSaveAddImage(GpImage image, GpImage newImage, EncoderParameters encoderParams);
GdipGetEncoderParameterListSize(GpImage image, ref Guid clsidEncoder, out uint size);
GdipCreateTexture(GpImage image, WrapMode wrapmode, out GpTexture texture);
internal static extern GpStatus GdipDrawImageI(GpGraphics graphics, GpImage image, int x, int y);
internal static extern GpStatus GdipCreateTexture2(GpImage image, WrapMode wrapmode, float x, float y, float width, float height, out GpTexture texture);
internal static extern GpStatus GdipDrawImagePointsI(GpGraphics graphics, GpImage image, Point[] dstpoints, int count);
internal static extern GpStatus GdipCreateTextureIA(GpImage image, GpImageAttributes imageAttributes, float x, float y, float width, float height, out GpTexture texture);
internal static extern GpStatus GdipDrawImageRect(GpGraphics graphics, GpImage image, float x, float y, float width, float height);
internal static extern GpStatus GdipCreateTexture2I(GpImage image, WrapMode wrapmode, int x, int y, int width, int height, out GpTexture texture);
internal static extern GpStatus GdipDrawImageRectRect(GpGraphics graphics, GpImage image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, Unit srcUnit, GpImageAttributes imageAttributes, IntPtr callback, IntPtr callbackData);
internal static extern GpStatus GdipCreateTextureIAI(GpImage image, GpImageAttributes imageAttributes, int x, int y, int width, int height, out GpTexture texture);
internal static extern GpStatus GdipGetEncoderParameterListSize(GpImage image, ref Guid clsidEncoder, out uint size);
internal static extern GpStatus GdipGetTextureImage(GpTexture brush, out GpImage image);
internal static extern GpStatus GdipGetImageBounds(GpImage image, byte[] srcRect, Unit srcUnit);
internal static extern GpStatus GdipGetImageWidth(GpImage image, out uint width);
internal static extern GpStatus GdipGetPropertyCount(GpImage image, out uint numOfProperty);
internal static extern GpStatus GdipGetPropertyIdList(GpImage image, uint numOfProperty, PROPID[] list);
internal static extern GpStatus GdipGetPropertyItemSize(GpImage image, PROPID propId, out uint size);
GdipDrawImageRectRect(GpGraphics graphics, GpImage image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, Unit srcUnit, GpImageAttributes imageAttributes, IntPtr callback, IntPtr callbackData);