ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | List of all members
ImageResizer.Plugins.Wic.WicBitmapPadder Class Reference
Inheritance diagram for ImageResizer.Plugins.Wic.WicBitmapPadder:
Inheritance graph
[legend]
Collaboration diagram for ImageResizer.Plugins.Wic.WicBitmapPadder:
Collaboration graph
[legend]

Public Member Functions

 WicBitmapPadder (IWICBitmapSource s, int left, int top, int right, int bottom, byte[] bgcolor, WICRect crop)
 Adds padding to a bitmap, optionally cropping it at the same time. More...
 
void GetSize (out uint puiWidth, out uint puiHeight)
 
void GetPixelFormat (out Guid pPixelFormat)
 
void GetResolution (out double pDpiX, out double pDpiY)
 
void CopyPalette (IWICPalette pIPalette)
 
void CopyPixels (WICRect prc, uint destStride, uint destBufferSize, [Out][MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)] byte[] destBuffer)
 

Detailed Description

Definition at line 10 of file WicBitmapPadder.cs.

Constructor & Destructor Documentation

ImageResizer.Plugins.Wic.WicBitmapPadder.WicBitmapPadder ( IWICBitmapSource  s,
int  left,
int  top,
int  right,
int  bottom,
byte[]  bgcolor,
WICRect  crop 
)
inline

Adds padding to a bitmap, optionally cropping it at the same time.

Parameters
s
left
top
right
bottom
bgcolor
crop

Definition at line 30 of file WicBitmapPadder.cs.

30  {
31  this.s = s;
32  this.left = left;
33  this.right = right;
34  this.bottom = bottom;
35  this.top = top;
36  this.bgcolor = bgcolor;
37  this.crop = crop;
38 
39  Guid pf;
40  s.GetPixelFormat(out pf);
41  if (bgcolor.Length != ConversionUtils.BytesPerPixel(pf)) throw new ArgumentException("bgcolor length must match the format bytes per pixel");
42  }

The documentation for this class was generated from the following file: