public static Bitmap ResizeCanvas(Bitmap src, int width, int height, ResizeMethod method, ResizeCanvasOrigin origin, Color background) { src.ThrowIfDisposed(); var dst = IntPtr.Zero; var bg = background.ToGflColor(); src.Gfl.ThrowIfError(src.Gfl.ResizeCanvas(src.Handle, width, height, method, origin, ref bg)); return new Bitmap(src.Gfl, dst); }
public static Bitmap RotateFine(Bitmap src, double angle, Color background) { src.ThrowIfDisposed(); var dst = IntPtr.Zero; var bg = background.ToGflColor(); src.Gfl.ThrowIfError(src.Gfl.RotateFine(src.Handle, angle, ref bg)); return new Bitmap(src.Gfl, dst); }
public static Bitmap FlipVertical(Bitmap src) { src.ThrowIfDisposed(); var dst = IntPtr.Zero; src.Gfl.ThrowIfError(src.Gfl.FlipVertical(src.Handle)); return new Bitmap(src.Gfl, dst); }
public static Bitmap Resize(Bitmap src, int width, int height, ResizeMethod method) { src.ThrowIfDisposed(); var dst = IntPtr.Zero; src.Gfl.ThrowIfError(src.Gfl.Resize(src.Handle, ref dst, width, height, method)); return new Bitmap(src.Gfl, dst); }
internal void FreeBitmapData(Bitmap bitmap) { this.ThrowIfDisposed(); if(this._FreeBitmapDataDelegate == null){ this._FreeBitmapDataDelegate = this.LoadMethod<FreeBitmapDataDelegate>("gflFreeBitmapData"); } this._FreeBitmapDataDelegate(bitmap.Handle); }
internal Error SaveBitmap(string filename, Bitmap bitmap, ref GflSaveParams prms) { this.ThrowIfDisposed(); if(this._SaveBitmapDelegate == null){ this._SaveBitmapDelegate = this.LoadMethod<SaveBitmapDelegate>("gflSaveBitmap"); } return this._SaveBitmapDelegate(filename, bitmap.Handle, ref prms); }
internal IntPtr CloneBitmap(Bitmap bitmap) { this.ThrowIfDisposed(); if(this._CloneBitmapDelegate == null){ this._CloneBitmapDelegate = this.LoadMethod<CloneBitmapDelegate>("gflCloneBitmap"); } return this._CloneBitmapDelegate(bitmap.Handle); }
internal Error FileAddPicture(IntPtr handle, Bitmap bitmap) { this.ThrowIfDisposed(); if(this._FileAddPictureDelegate == null){ this._FileAddPictureDelegate = this.LoadMethod<FileAddPictureDelegate>("gflFileAddPicture"); } return this._FileAddPictureDelegate(handle, bitmap.Handle); }
internal void BitmapSetEXIFThumbnail(Bitmap bitmap, Bitmap thumbnail) { this.ThrowIfDisposed(); if(this._BitmapSetEXIFThumbnailDelegate == null){ this._BitmapSetEXIFThumbnailDelegate = this.LoadMethod<BitmapSetEXIFThumbnailDelegate>("gflBitmapSetEXIFThumbnail"); } this._BitmapSetEXIFThumbnailDelegate(bitmap.Handle, thumbnail.Handle); }
internal void BitmapRemoveMetaData(Bitmap bitmap) { this.ThrowIfDisposed(); if(this._BitmapRemoveMetaDataDelegate == null){ this._BitmapRemoveMetaDataDelegate = this.LoadMethod<BitmapRemoveMetaDataDelegate>("gflBitmapRemoveMetaData"); } this._BitmapRemoveMetaDataDelegate(bitmap.Handle); }
internal Error BitmapRemoveEXIFThumbnail(Bitmap bitmap) { this.ThrowIfDisposed(); if(this._BitmapRemoveEXIFThumbnailDelegate == null){ this._BitmapRemoveEXIFThumbnailDelegate = this.LoadMethod<BitmapRemoveEXIFThumbnailDelegate>("gflBitmapRemoveEXIFThumbnail"); } return this._BitmapRemoveEXIFThumbnailDelegate(bitmap.Handle); }
internal bool BitmapHasIPTC(Bitmap bitmap) { this.ThrowIfDisposed(); if(this._BitmapHasIPTCDelegate == null){ this._BitmapHasIPTCDelegate = this.LoadMethod<BitmapHasIPTCDelegate>("gflBitmapHasIPTC"); } return this._BitmapHasIPTCDelegate(bitmap.Handle); }
internal IntPtr BitmapGetEXIF(Bitmap bitmap, GetExifOptions options) { this.ThrowIfDisposed(); if(this._BitmapGetEXIFDelegate == null){ this._BitmapGetEXIFDelegate = this.LoadMethod<BitmapGetEXIFDelegate>("gflBitmapGetEXIF"); } return this._BitmapGetEXIFDelegate(bitmap.Handle, options); }