»
Symbian OS v6.1 Edition for C++ »
API Reference »
InfraRed Transfer Picture Protocol »
TTranpPicture
Location:
tranp.h
Link against: irtranp.lib
TTranpPicture
Support
Supported from 6.0
Description
Represents a picture in Unified Picture Format (UPF), a standard
for image data transmitted via infrared communication.
An object of this type is used when transmitting pictures using the
IrTranP protocol.
A received picture can be saved as a JPEG type for viewing or it
can be saved in native UPF format.
Defined in TTranpPicture
:
Filename()
, GetAspectRatio()
, GetLatticeSize()
, GetThumbNail()
, LoadFromJpeg()
, LoadFromUPF()
, LongFilename()
, Picture()
, SaveAsJpeg()
, SaveAsUPF()
, SetDesiredAspectRatio()
, SetDesiredLatticeSize()
, SetFilename()
, SetLongFilename()
, SetTime()
, Time()
File name attributes
void SetFilename(const TDesC8& aName);
Description
Sets the file name of the picture in DOS 8.3 format.
Parameters
const TDesC8& aName |
The filename in 8.3 format. |
|
const TDesC8& Filename();
Description
Returns the DOS 8.3 format file name of the picture.
Return value
const TDesC8& |
The filename in 8.3 format. |
|
void SetLongFilename(const TDesC8& aName);
Description
Sets the file name of the picture in SJIS or as an ISO8859-1
character string.
Parameters
const TDesC8& aName |
The filename in long format. |
|
const TDesC8& LongFilename();
Description
Returns the file name of the picture in SJIS or as an ISO8859-1
character string.
Return value
const TDesC8& |
The filename in long format. |
|
const TDesC8* Picture();
Description
Returns a pointer to a non-modifiable descriptor containing the image
data. The image is in JPEG format.
Return value
const TDesC8* |
A pointer to the image data. |
|
const TDesC8* GetThumbNail();
Description
Returns a pointer to a descriptor containing a thumbnail representation
of the image. The thumbnail is in JPEG format.
Return value
const TDesC8* |
A pointer to the thumbnail data. |
|
void SetTime(const TDesC8& aTime);
Description
Sets the time stamp attribute for the picture.
Parameters
const TDesC8& aName |
The time stamp in YYYYMMDDHHMMSS character format. |
|
const TDesC8& Time();
Description
Returns the time stamp attribute for the picture
Return value
const TDesC8& |
The time stamp in YYYYMMDDHHMMSS character format. |
|
Saving picture to a file on the host device
TInt SaveAsJpeg(const TFileName& aFileName);
Description
Saves the image data in JPEG format to the specified file on the host
device.
Parameters
const TFileName& aFileName |
The name of the file to contain the JPEG format image data. |
|
Return value
TInt |
KErrNone if successful, otherwise one of the other system
wide error codes. |
|
TInt SaveAsUPF(const TFileName& aFileName);
Description
Saves the image data in native UPF format to the specified file on the
host device.
Parameters
const TFileName& aFileName |
The name of the file to contain the native UPF format image data. |
|
Return value
TInt |
KErrNone if successful, otherwise one of the other system
wide error codes. |
|
Loading picture from file on the host device
TInt LoadFromJpeg(const TFileName& aFileName);
Description
Loads JPEG format image data from the specified file on the host
device.
Parameters
const TFileName& aFileName |
The name of the file containing the JPEG format image data. |
|
Return value
TInt |
KErrNone if successful, otherwise one of the other system
wide error codes. |
|
TInt LoadFromUPF(const TFileName& aFileName);
Description
Loads native UPF format image data from the specified file on the host
device.
Parameters
const TFileName& aFileName |
The name of the file containing the native UPF format image data. |
|
Return value
TInt |
KErrNone if successful, otherwise one of the other system
wide error codes. |
|
void SetDesiredLatticeSize(TLatticeSize aSize, TInt aWidth = 0, TInt aHeight = 0);
Description
Sets the desired size of the picture to be received. The desired size
defaults to EVGA
.
Parameters
TLatticeSize aSize |
An enumerator encoding the desired size of the picture to be
received. |
TInt aWidth |
The desired width of the picture, if the desired size is set
toEFREE . This value is ignored if the size is set to any of the
other TLatticeSize enumerator values. |
TInt aHeight |
The desired height of the picture, if the desired size is set
toEFREE . This value is ignored if the size is set to any of the
other TLatticeSize enumerator values. |
|
void GetDesiredLatticeSize(TLatticeSize& aSize, TInt& aWidth, TInt& aHeight);
Description
Returns the desired size of the picture to be received. By default, if no
size has been explicitly set, the desired size defaults
toEVGA
.
Parameters
TLatticeSize& aSize |
On return, an enumerator encoding the desired size of the picture to be
received. |
TInt& aWidth |
On return, the desired width of the picture, if the desired size
isEFREE . This value is not set if the size has any
otherTLatticeSize enumerator value. |
TInt& aHeight |
On return, the desired height of the picture, if the desired size
isEFREE . This value is no set if the size has any
otherTLatticeSize enumerator value. |
|
void SetDesiredAspectRatio(TInt aX, TInt aY);
Description
Sets the desired aspect ratio of the picture to be received. The desired
aspect ratio defaults to 1:1.
Parameters
TInt aX |
The horizontal component of the aspect ratio. |
TInt aY |
The vertical component of the aspect ratio. |
|
void GetAspectRatio(TInt& aX, TInt& aY);
Description
Returns the desired aspect ratio of the picture to be received. By
default, if no aspect ratio has been explicitly set, the desired aspect ratio
defaults to 1:1.
Parameters
TInt& aX |
On return, the horizontal component of the aspect ratio. |
TInt& aY |
On return, the vertical component of the aspect ratio. |
|