Example #1
0
 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);
 }
Example #2
0
 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);
 }
Example #3
0
 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);
 }
Example #4
0
 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);
 }
Example #5
0
 internal void FreeBitmapData(Bitmap bitmap)
 {
     this.ThrowIfDisposed();
     if(this._FreeBitmapDataDelegate == null){
         this._FreeBitmapDataDelegate = this.LoadMethod<FreeBitmapDataDelegate>("gflFreeBitmapData");
     }
     this._FreeBitmapDataDelegate(bitmap.Handle);
 }
Example #6
0
 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);
 }
Example #7
0
 internal IntPtr CloneBitmap(Bitmap bitmap)
 {
     this.ThrowIfDisposed();
     if(this._CloneBitmapDelegate == null){
         this._CloneBitmapDelegate = this.LoadMethod<CloneBitmapDelegate>("gflCloneBitmap");
     }
     return this._CloneBitmapDelegate(bitmap.Handle);
 }
Example #8
0
 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);
 }
Example #9
0
 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);
 }
Example #10
0
 internal void BitmapRemoveMetaData(Bitmap bitmap)
 {
     this.ThrowIfDisposed();
     if(this._BitmapRemoveMetaDataDelegate == null){
         this._BitmapRemoveMetaDataDelegate = this.LoadMethod<BitmapRemoveMetaDataDelegate>("gflBitmapRemoveMetaData");
     }
     this._BitmapRemoveMetaDataDelegate(bitmap.Handle);
 }
Example #11
0
 internal Error BitmapRemoveEXIFThumbnail(Bitmap bitmap)
 {
     this.ThrowIfDisposed();
     if(this._BitmapRemoveEXIFThumbnailDelegate == null){
         this._BitmapRemoveEXIFThumbnailDelegate = this.LoadMethod<BitmapRemoveEXIFThumbnailDelegate>("gflBitmapRemoveEXIFThumbnail");
     }
     return this._BitmapRemoveEXIFThumbnailDelegate(bitmap.Handle);
 }
Example #12
0
 internal bool BitmapHasIPTC(Bitmap bitmap)
 {
     this.ThrowIfDisposed();
     if(this._BitmapHasIPTCDelegate == null){
         this._BitmapHasIPTCDelegate = this.LoadMethod<BitmapHasIPTCDelegate>("gflBitmapHasIPTC");
     }
     return this._BitmapHasIPTCDelegate(bitmap.Handle);
 }
Example #13
0
 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);
 }