pCon.planner Plugin SDK  Version 8.8.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Properties | List of all members
X3g::Plugin::Image Class Reference

Holds an image. More...

Public Member Functions

 Image (int pWidth, int pHeight, PixelFormat pFormat, array< unsigned char >^pData)
 Constructor for class Image with custom image data. More...
 
virtual bool Equals (System::Object^ pOther) override
 Returns only true if the given Object is of Image type and delivers the same hash. More...
 
virtual int GetHashCode () override
 Returns the 32 bit hash of the image. More...
 
System::Int64 GetHashCode64 ()
 Returns the 64 bit hash of the image. More...
 
bool IsTransparent ()
 Returns true if the image has transparent pixels. More...
 
ImageResize (int pWidth, int pHeight)
 Returns resized version of image. More...
 
void ToStream (System::IO::Stream^ pStream, ImageFormat pFormat)
 Writes the image to stream. More...
 
Bitmap^ ToBitmap ()
 Converts image to a GDI+ bitmap. More...
 
array< unsigned char >^ GetData ()
 Returns copy of uncompressed image data. More...
 
GeVec4f Sample4f (float u, float v, bool pBilinear)
 Allows image resampling with bilinear interpolation. More...
 
IntPtr GetDataPtr ()
 Returns pointer to uncompressed image data. More...
 

Static Public Member Functions

static ImageLoadFromFile (String^ pFileName)
 Loads image from file. More...
 
static ImageLoadFromStream (System::IO::Stream^ pStream)
 Loads image from stream. More...
 

Properties

String^  FileName [get]
 Returns the source filename of the image. More...
 
int Width [get]
 Width of the image in pixels. More...
 
int Height [get]
 Height of the image in pixels. More...
 
PixelFormat Format [get]
 Pixel format of the image. More...
 
int BitsPerPixel [get]
 Number of bits per pixel. More...
 

Detailed Description

Holds an image.

Constructor & Destructor Documentation

X3g::Plugin::Image::Image ( int  pWidth,
int  pHeight,
PixelFormat  pFormat,
array< unsigned char >^  pData 
)

Constructor for class Image with custom image data.

Parameters
pWidthThe width of the image. Expects a value greater then 0.
pHeightThe height of the image. Expects a value greater then 0.
pFormatThe pixel format. See PixelFormat for the bit width.
pDataThe desired image data. The size of this array has to be:
width * height * (bit_width / 8)

Member Function Documentation

bool X3g::Plugin::Image::Equals ( System::Object^  pOther)
overridevirtual

Returns only true if the given Object is of Image type and delivers the same hash.

Otherwise the result is false.

array< unsigned char > X3g::Plugin::Image::GetData ( )

Returns copy of uncompressed image data.

IntPtr X3g::Plugin::Image::GetDataPtr ( )

Returns pointer to uncompressed image data.

int X3g::Plugin::Image::GetHashCode ( )
overridevirtual

Returns the 32 bit hash of the image.

System::Int64 X3g::Plugin::Image::GetHashCode64 ( )

Returns the 64 bit hash of the image.

bool X3g::Plugin::Image::IsTransparent ( )

Returns true if the image has transparent pixels.

Image X3g::Plugin::Image::LoadFromFile ( String pFileName)
static

Loads image from file.

Returns null if image couldn't be loaded.

Image X3g::Plugin::Image::LoadFromStream ( System::IO::Stream^  pStream)
static

Loads image from stream.

Returns null if image couldn't be loaded. Image format is detected automatically.

Image X3g::Plugin::Image::Resize ( int  pWidth,
int  pHeight 
)

Returns resized version of image.

GeVec4f X3g::Plugin::Image::Sample4f ( float  u,
float  v,
bool  pBilinear 
)

Allows image resampling with bilinear interpolation.

Bitmap X3g::Plugin::Image::ToBitmap ( )

Converts image to a GDI+ bitmap.

void X3g::Plugin::Image::ToStream ( System::IO::Stream^  pStream,
ImageFormat  pFormat 
)

Writes the image to stream.

Property Documentation

int X3g::Plugin::Image::BitsPerPixel
get

Number of bits per pixel.

String^ X3g::Plugin::Image::FileName
get

Returns the source filename of the image.

PixelFormat X3g::Plugin::Image::Format
get

Pixel format of the image.

int X3g::Plugin::Image::Height
get

Height of the image in pixels.

int X3g::Plugin::Image::Width
get

Width of the image in pixels.