#include <CCImage.h>
|
enum | Format {
JPG,
PNG,
TIFF,
WEBP,
PVR,
ETC,
S3TC,
ATITC,
TGA,
RAW_DATA,
UNKOWN
} |
| Supported formats for Image. More...
|
|
|
bool | initWithJpgData (const unsigned char *data, ssize_t dataLen) |
bool | initWithPngData (const unsigned char *data, ssize_t dataLen) |
bool | initWithTiffData (const unsigned char *data, ssize_t dataLen) |
local | initWithTiffData ( local data, local dataLen) |
bool | initWithWebpData (const unsigned char *data, ssize_t dataLen) |
bool | initWithPVRData (const unsigned char *data, ssize_t dataLen) |
bool | initWithPVRv2Data (const unsigned char *data, ssize_t dataLen) |
local | initWithPVRv2Data ( local data, local dataLen) |
bool | initWithPVRv3Data (const unsigned char *data, ssize_t dataLen) |
bool | initWithETCData (const unsigned char *data, ssize_t dataLen) |
bool | initWithS3TCData (const unsigned char *data, ssize_t dataLen) |
bool | initWithATITCData (const unsigned char *data, ssize_t dataLen) |
bool | initWithTGAData (tImageTGA *tgaData) |
bool | saveImageToPNG (const std::string &filePath, bool isToRGB=true) |
bool | saveImageToJPG (const std::string &filePath) |
| Ref () |
| Constructor. More...
|
|
Supported formats for Image.
Enumerator |
---|
JPG |
JPEG.
|
PNG |
PNG.
|
TIFF |
TIFF.
|
WEBP |
WebP.
|
PVR |
PVR.
|
ETC |
ETC.
|
S3TC |
S3TC.
|
ATITC |
ATITC.
|
TGA |
TGA.
|
RAW_DATA |
Raw Data.
|
UNKOWN |
Unknown format.
|
Supported formats for Image.
Enumerator |
---|
JPG |
JPEG.
|
PNG |
PNG.
|
TIFF |
TIFF.
|
WEBP |
WebP.
|
PVR |
PVR.
|
ETC |
ETC.
|
S3TC |
S3TC.
|
ATITC |
ATITC.
|
TGA |
TGA.
|
RAW_DATA |
Raw Data.
|
UNKOWN |
Unknown format.
|
Supported formats for Image.
Enumerator |
---|
JPG |
JPEG.
|
PNG |
PNG.
|
TIFF |
TIFF.
|
WEBP |
WebP.
|
PVR |
PVR.
|
ETC |
ETC.
|
S3TC |
S3TC.
|
ATITC |
ATITC.
|
TGA |
TGA.
|
RAW_DATA |
Raw Data.
|
UNKOWN |
Unknown format.
|
unsigned char* getData |
( |
) | |
|
|
inline |
int getNumberOfMipmaps |
( |
) | |
|
|
inline |
var getNumberOfMipmaps |
( |
) | |
|
|
inline |
local getNumberOfMipmaps |
( |
) | |
|
|
inline |
local getRenderFormat |
( |
) | |
|
|
inline |
bool hasPremultipliedAlpha |
( |
) | |
|
|
inline |
var hasPremultipliedAlpha |
( |
) | |
|
|
inline |
local hasPremultipliedAlpha |
( |
) | |
|
|
inline |
bool initWithATITCData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithATITCData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithATITCData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithETCData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithETCData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithETCData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithImageData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
Load image from stream buffer.
- Parameters
-
data | stream buffer which holds the image data. |
dataLen | data length expressed in (number of) bytes. |
- Returns
- true if loaded correctly.
bool initWithImageFile |
( |
const std::string & |
path) | |
|
Load the image from the specified path.
- Parameters
-
path | the absolute file path. |
- Returns
- true if loaded correctly.
var initWithImageFile |
( |
var |
path) | |
|
Load the image from the specified path.
- Parameters
-
path | the absolute file path. |
- Returns
- true if loaded correctly.
bool initWithJpgData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithJpgData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithJpgData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithPngData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithPngData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithPngData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithPVRData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithPVRData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithPVRData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithPVRv2Data |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithPVRv2Data |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithPVRv2Data |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithPVRv3Data |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithPVRv3Data |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithPVRv3Data |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithRawData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
bitsPerComponent, |
|
|
bool |
preMulti = false |
|
) |
| |
var initWithRawData |
( |
var |
data, |
|
|
var |
dataLen, |
|
|
var |
width, |
|
|
var |
height, |
|
|
var |
bitsPerComponent, |
|
|
var |
preMulti = false |
|
) |
| |
local initWithRawData |
( |
local |
data, |
|
|
local |
dataLen, |
|
|
local |
width, |
|
|
local |
height, |
|
|
local |
bitsPerComponent, |
|
|
local |
preMulti = false |
|
) |
| |
bool initWithS3TCData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithS3TCData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithS3TCData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
var initWithTGAData |
( |
var |
tgaData) | |
|
|
protected |
local initWithTGAData |
( |
local |
tgaData) | |
|
|
protected |
bool initWithTiffData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithTiffData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithTiffData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool initWithWebpData |
( |
const unsigned char * |
data, |
|
|
ssize_t |
dataLen |
|
) |
| |
|
protected |
var initWithWebpData |
( |
var |
data, |
|
|
var |
dataLen |
|
) |
| |
|
protected |
local initWithWebpData |
( |
local |
data, |
|
|
local |
dataLen |
|
) |
| |
|
protected |
bool isPremultipliedAlpha |
( |
) | |
|
|
inline |
var isPremultipliedAlpha |
( |
) | |
|
|
inline |
local isPremultipliedAlpha |
( |
) | |
|
|
inline |
bool saveImageToJPG |
( |
const std::string & |
filePath) | |
|
|
protected |
var saveImageToJPG |
( |
var |
filePath) | |
|
|
protected |
local saveImageToJPG |
( |
local |
filePath) | |
|
|
protected |
bool saveImageToPNG |
( |
const std::string & |
filePath, |
|
|
bool |
isToRGB = true |
|
) |
| |
|
protected |
var saveImageToPNG |
( |
var |
filePath, |
|
|
var |
isToRGB = true |
|
) |
| |
|
protected |
local saveImageToPNG |
( |
local |
filePath, |
|
|
local |
isToRGB = true |
|
) |
| |
|
protected |
bool saveToFile |
( |
const std::string & |
filename, |
|
|
bool |
isToRGB = true |
|
) |
| |
Save Image data to the specified file, with specified format.
- Parameters
-
filePath | the file's absolute path, including file suffix. |
isToRGB | whether the image is saved as RGB format. |
var saveToFile |
( |
var |
filename, |
|
|
var |
isToRGB = true |
|
) |
| |
Save Image data to the specified file, with specified format.
- Parameters
-
filePath | the file's absolute path, including file suffix. |
isToRGB | whether the image is saved as RGB format. |
local saveToFile |
( |
local |
filename, |
|
|
local |
isToRGB = true |
|
) |
| |
Save Image data to the specified file, with specified format.
- Parameters
-
filePath | the file's absolute path, including file suffix. |
isToRGB | whether the image is saved as RGB format. |
The documentation for this class was generated from the following file:
- /Users/cocos2d/MyWork/cocos2d-x-develop/cocos/2d/platform/CCImage.h