Powertek.Imaging.PtBitmap Struct Reference

Additional Bitmap functions. More...

List of all members.

Static Public Member Functions

static bool ResizeBitmap (Bitmap orgBmp, int newWidth, int newHeight, bool keepAspectRatio)
static Bitmap ResizeBitmapHQ (Bitmap orgBmp, int newWidth, int newHeight, bool keepAspectRatio)
static Bitmap ResizeBitmapLQ (Bitmap orgBmp, int newWidth, int newHeight, bool keepAspectRatio)
static Bitmap ResizeBitmap (Bitmap orgBmp, int newWidth, int newHeight, bool keepAspectRatio, CompositingQuality compositingQuality, SmoothingMode smoothingMode, InterpolationMode interPolationMode, PixelOffsetMode pixelOffsetMode)
static bool ChangePixelFormat (Bitmap inBmp, out Bitmap outBmp, PixelFormat newPixelFormat)
static bool BitmapToArray (Bitmap bmp, int arrayColorBits, out Byte[] ar)
static Byte[] BitmapToArray (Bitmap bmp, int arrayColorBits)
static bool ArrayToBitmap32 (Byte[] ar, out Bitmap bmp, int arrayColorBits, int width, int height)
static Bitmap ArrayToBitmap32 (Byte[] ar, int arrayColorBits, int width, int height)
static bool GrayScale (Bitmap inBmp, out Bitmap outBmp, bool correctLuminance)
static bool SaveJpg (Bitmap bmp, string imageName, int qual)
static Bitmap FromFile (String fileName)


Detailed Description


Member Function Documentation

static Bitmap Powertek.Imaging.PtBitmap.ArrayToBitmap32 ( Byte[]  ar,
int  arrayColorBits,
int  width,
int  height 
) [static]

Copies a 8/24bit/32bit Array into an 32bitBitmap No Conversion of the channels like GrayScale will be done...

Parameters:
ar The input array representing a bitmap
arrayColorBits The number of bits used in the input array, 8, 24, 32 are supported
width Width of the Bitmap, Width*Height*ColorBits must be valid
height Height of the Bitmap, Width*Height*ColorBits must be valid
Returns:

static bool Powertek.Imaging.PtBitmap.ArrayToBitmap32 ( Byte[]  ar,
out Bitmap  bmp,
int  arrayColorBits,
int  width,
int  height 
) [static]

Copies a 8/24bit/32bit Array into an 32bitBitmap No Conversion of the channels like GrayScale will be done...

Parameters:
ar The input array representing a bitmap
bmp Output Bitmap
arrayColorBits The number of bits used in the input array, 8, 24, 32 are supported
width Width of the Bitmap, Width*Height*ColorBits must be valid
height Height of the Bitmap, Width*Height*ColorBits must be valid
Returns:
Tru if all ok, else false

static Byte [] Powertek.Imaging.PtBitmap.BitmapToArray ( Bitmap  bmp,
int  arrayColorBits 
) [static]

Copies a 24bit/32bit Bitmap into an 8/24/32bit Byte Array No Conversion of the channels like GrayScale will be done...

Parameters:
bmp Input Bitmap
arrayColorBits The number of bits to be used in the resulting array, 8, 24, 32 are supported
Returns:
The Resulting Byte array or null on error

static bool Powertek.Imaging.PtBitmap.BitmapToArray ( Bitmap  bmp,
int  arrayColorBits,
out Byte[]  ar 
) [static]

Copies a 24bit/32bit Bitmap into an 8/24/32bit Byte Array No Conversion of the channels like GrayScale will be done...

Parameters:
bmp Input Bitmap
arrayColorBits The number of bits to be used in the resulting array, 8, 24, 32 are supported
ar The resulting Byte Array
Returns:
True if all OK, False on Error

static bool Powertek.Imaging.PtBitmap.ChangePixelFormat ( Bitmap  inBmp,
out Bitmap  outBmp,
PixelFormat  newPixelFormat 
) [static]

Change the PixelFormat of the Input Bmp to the desired Format WARNING > at this time this is testet for 32/24 bit Bitmaps only output to 24/32 bits seems to work with all input bitmaps.

Parameters:
inBmp Input Bitmap
outBmp Output Bitmap
newPixelFormat Desired Pixelformat

static Bitmap Powertek.Imaging.PtBitmap.FromFile ( String  fileName  )  [static]

Loads a bitmap from file, Supports also TGA 24/32bit.

Parameters:
fileName Name of the Bitmap to load
Returns:
False if the file dont exists or on error, else 32Bit Bitmap (PixelFormat.Format32bppArgb)

Here is the call graph for this function:

static bool Powertek.Imaging.PtBitmap.GrayScale ( Bitmap  inBmp,
out Bitmap  outBmp,
bool  correctLuminance 
) [static]

Converts the Input Bitmap to GrayScale using GDI+ ColorMatrix Note: using the same function of the ColorArray Class would be 2-5 times faster...

Parameters:
inBmp Input Bitmap
outBmp Output Grayscale Bitmap
correctLuminance Correct grayscale luminance

static Bitmap Powertek.Imaging.PtBitmap.ResizeBitmap ( Bitmap  orgBmp,
int  newWidth,
int  newHeight,
bool  keepAspectRatio,
CompositingQuality  compositingQuality,
SmoothingMode  smoothingMode,
InterpolationMode  interPolationMode,
PixelOffsetMode  pixelOffsetMode 
) [static]

Resize the Input Bitmap to the desired Size using Graphics Object.

Parameters:
orgBmp Original Bitmap
newWidth New Bitmap width
newHeight New Bitmap height
keepAspectRatio If true, the width/height input will be adjusted to the aspect of the input bitmap
compositingQuality CompositingQuality
smoothingMode Smoothing Mode
interPolationMode Interpolation Mode
pixelOffsetMode 
Returns:
Resized Bitmap or null on error

static bool Powertek.Imaging.PtBitmap.ResizeBitmap ( Bitmap  orgBmp,
int  newWidth,
int  newHeight,
bool  keepAspectRatio 
) [static]

Resize the Input Bitmap to the desired Size This function uses standard GDI+, downsizing is very fast, but upsizing may result in some border errors.

Parameters:
orgBmp Original and resulting Bitmap (in/out)
newWidth New Bitmap width
newHeight New Bitmap height
keepAspectRatio 

static Bitmap Powertek.Imaging.PtBitmap.ResizeBitmapHQ ( Bitmap  orgBmp,
int  newWidth,
int  newHeight,
bool  keepAspectRatio 
) [static]

Resize the Input Bitmap to the desired Size, HighQuality Settings.

Parameters:
orgBmp Original Bitmap
newWidth New Bitmap width
newHeight New Bitmap height
keepAspectRatio If true, the width/height input will be adjusted to the aspect of the input bitmap
Returns:
Resized Bitmap or null on error

static Bitmap Powertek.Imaging.PtBitmap.ResizeBitmapLQ ( Bitmap  orgBmp,
int  newWidth,
int  newHeight,
bool  keepAspectRatio 
) [static]

Resize the Input Bitmap to the desired Size, LowQuality (Fast) Settings.

Parameters:
orgBmp Original Bitmap
newWidth New Bitmap width
newHeight New Bitmap height
keepAspectRatio If true, the width/height input will be adjusted to the aspect of the input bitmap
Returns:
Resized Bitmap or null on error

static bool Powertek.Imaging.PtBitmap.SaveJpg ( Bitmap  bmp,
string  imageName,
int  qual 
) [static]

Saves the Bitmap with the submitted JPG Settings.

Parameters:
bmp 
imageName Input Bitmap
qual Quality of the JPG Compression (0..100 = maximum quality)
Returns:
False on error else true


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

Generated on Thu Nov 20 04:48:15 2008 for Powertek.Imaging, 2.0.2.46 by  doxygen 1.5.7.1