A bitmap image class. Uses CFbsBitmap as an underlying implementation. More...
#include <ncvImage.h>
List of all members.
|
Public Member Functions
|
virtual IMPORT_C |
~CNokiaCVImage () |
| |
Destructor.
|
| IMPORT_C void |
CreateL (const TDesC &aFileName) |
| |
Create image from a file.
|
| IMPORT_C void |
CreateL (CFbsBitmap &aBitmap) |
| |
Create image from CFbsBitmap. Ownership is moved.
|
| IMPORT_C void |
CreateL (TSize aSize, TDisplayMode aDisplayMode=EColor16M) |
| |
Create empty image with given size.
|
| IMPORT_C CFbsBitmap * |
Bitmap () |
| |
Get pointer to the original bitmap, Ownership is not transferred.
|
| IMPORT_C TSize |
Size () const |
| |
Size of the image.
|
| IMPORT_C TUint32 * |
Ptr () const |
| |
Address of the first pixel. Ownership is not transfered.
|
| IMPORT_C TDisplayMode |
DisplayMode () |
| |
Return the display mode of this CNokiaCVImage.
|
| IMPORT_C void |
GetPixel (TRgb &aColor, TPoint &aPixel) |
| |
Get the RGB value of the specified pixel.
|
IMPORT_C TColorSpace |
ColorSpace () const |
IMPORT_C TImageType |
GetImageType () |
| |
Returns the type of the image (bw, grayscale or rgb), This is derived from the DisplayMode.
|
Static Public Member Functions
|
| static IMPORT_C CNokiaCVImage * |
NewL () |
| |
Factory method for creating an instance.
|
| static IMPORT_C CNokiaCVImage * |
NewLC () |
| |
Factory method for creating an instance.
|
| static IMPORT_C void |
Copy (CNokiaCVImage *aSource, CNokiaCVImage *aTarget, TInt aBlendingRatio=100) |
| |
Copy a source image to the target image. Source and target images may be of different display modes and sizes.
|
| static IMPORT_C void |
Copy (CNokiaCVImage *aSource, CNokiaCVImage *aTarget, TRect aSubregion, TPoint aTargetPoint=TPoint(0, 0), TInt aBlendingRatio=50) |
| |
Copy a source image to the target image. Source and target images may be of different display modes and sizes.
|
Protected Member Functions
|
|
CNokiaCVImage () |
| |
Protected empty constructor. Use factory methods for creation.
|
void |
ConstructL () |
| |
Second-phase constructor.
|
Detailed Description
A bitmap image class. Uses CFbsBitmap as an underlying implementation.
CNokiaCVImage is a wrapper for CFbsBitmap that is provided by the platform. This class provides DisplayMode independent access to the pixel data, The user of the library does not need to take care of the bit depth conversions.
Usage examples (see example applications for more examples):
// load from file
CNokiaCVImage* incvBitmap = CNokiaCVImage::NewL();
TRAPD(err1, incvBitmap->CreateL( *aImageFullName ));
...
// draw bitmap
CWindowGc& gc = SystemGc();
gc.BitBlt( TPoint( 0,0 ), incvBitmap->Bitmap() );
Definition at line 521 of file ncvImage.h.
Member Function Documentation
Factory method for creating an instance.
Implements two-phase construction functions (NewL(), ConstructL()) to create a new instance of the object.
Creates new uninitialized image instance.
- Returns:
- CNokiaCVImage*
Factory method for creating an instance.
Implements two-phase construction functions (NewLC(), ConstructL()) to create a new instance of the object.
Creates new uninitialized image instance.
- Returns:
- CNokiaCVImage*
| IMPORT_C void CNokiaCVImage::CreateL |
( |
const TDesC & |
aFileName |
) |
|
Create image from a file.
- Parameters:
-
- Note:
- the function can leave
| IMPORT_C void CNokiaCVImage::CreateL |
( |
CFbsBitmap & |
aBitmap |
) |
|
Create image from CFbsBitmap. Ownership is moved.
- Parameters:
-
- Note:
- the function can leave
| IMPORT_C void CNokiaCVImage::CreateL |
( |
TSize |
aSize, |
|
|
TDisplayMode |
aDisplayMode = EColor16M |
|
|
) |
|
|
|
Create empty image with given size.
- Parameters:
-
- Note:
- the function can leave
| IMPORT_C CFbsBitmap* CNokiaCVImage::Bitmap |
( |
|
) |
|
Get pointer to the original bitmap, Ownership is not transferred.
- Returns:
- CFbsBitmap*
| IMPORT_C TSize CNokiaCVImage::Size |
( |
|
) |
const |
Size of the image.
- Returns:
- TSize
| IMPORT_C TUint32* CNokiaCVImage::Ptr |
( |
|
) |
const |
Address of the first pixel. Ownership is not transfered.
- Returns:
- TUint32*
| IMPORT_C TDisplayMode CNokiaCVImage::DisplayMode |
( |
|
) |
|
Return the display mode of this CNokiaCVImage.
- Returns:
- TDisplayMode
| IMPORT_C void CNokiaCVImage::GetPixel |
( |
TRgb & |
aColor, |
|
|
TPoint & |
aPixel |
|
|
) |
|
|
|
Get the RGB value of the specified pixel.
- Parameters:
-
Copy a source image to the target image. Source and target images may be of different display modes and sizes.
- Parameters:
-
|
aSource |
CNokiaCVImage to use for source |
|
aTarget |
CNokiaCVImage to use for target |
|
aBlendingRatio |
A ratio for alpha blending images. An integer between 0 and 100. Default value = 100 which copies the source fully over the target. |
| static IMPORT_C void CNokiaCVImage::Copy |
( |
CNokiaCVImage * |
aSource, |
|
|
CNokiaCVImage * |
aTarget, |
|
|
TRect |
aSubregion, |
|
|
TPoint |
aTargetPoint = TPoint(0, 0), |
|
|
TInt |
aBlendingRatio = 50 |
|
|
) |
|
|
[static] |
Copy a source image to the target image. Source and target images may be of different display modes and sizes.
- Parameters:
-
|
aSource |
CNokiaCVImage to use for source |
|
aTarget |
CNokiaCVImage to use for target |
|
aSubregion |
A rectangular subregion of the source image to copy. (i.e. crops the image) |
|
aTargetPoint |
A top-left point in target image to copy the subregion to. |
|
aBlendingRatio |
A ratio for blending images. An integer between 0 and 100. Value 100 means normal copy with no transparency. |
The documentation for this class was generated from the following file:
Generated on Tue Jul 10 22:58:42 2007 for NokiaComputerVisionLibrary by
1.5.2