There is no functions available to do those particular image effects.
You'd have to write those yourself, or if you have or find some library that implement it, its probably easy to port.
You also need raw access to the image data. (the pixel buffer)
That you can easily do along this pattern:
void DoEffect(CFbsBitmap* aBmp)
{
aBmp->LockHeap();
TUint8* data = aBmp->DataAddress();
TInt stride = aBmp->DataStride();
TInt size = aBmp->SizeInPixels();
for(TInt y = 0; y < size.iHeight; y++) {
TUint32* scanline = (TUint32*)data;
for(TInt x = 0; x < size.iWidth; x++) {
//Get pixel
TUint32 pixel = scanline[x];
//Get color channels
TUint8 a = (pixel>>24)&0xff;
TUint8 r = (pixel>>16)&0xff;
TUint8 g = (pixel>>8)&0xff;
TUint8 b = (pixel>>0)&0xff;
// Do effect
// ...
//Write back pixel (if you changed it. some effects will need a 2nd destination bitmap you write in instead)
scanline[x] = pixel;
}
data += stride;
}
aBmp->UnlockHeap();
}
Above code is for EColor16MA 32 bit color format with alpha (per pixel transparency)
For other formats, the cast and extracting color channels will differ.
Forum posts: 1419
There is no functions available to do those particular image effects.
You'd have to write those yourself, or if you have or find some library that implement it, its probably easy to port.
You also need raw access to the image data. (the pixel buffer)
That you can easily do along this pattern:
void DoEffect(CFbsBitmap* aBmp) { aBmp->LockHeap(); TUint8* data = aBmp->DataAddress(); TInt stride = aBmp->DataStride(); TInt size = aBmp->SizeInPixels(); for(TInt y = 0; y < size.iHeight; y++) { TUint32* scanline = (TUint32*)data; for(TInt x = 0; x < size.iWidth; x++) { //Get pixel TUint32 pixel = scanline[x]; //Get color channels TUint8 a = (pixel>>24)&0xff; TUint8 r = (pixel>>16)&0xff; TUint8 g = (pixel>>8)&0xff; TUint8 b = (pixel>>0)&0xff; // Do effect // ... //Write back pixel (if you changed it. some effects will need a 2nd destination bitmap you write in instead) scanline[x] = pixel; } data += stride; } aBmp->UnlockHeap(); }Above code is for EColor16MA 32 bit color format with alpha (per pixel transparency)
For other formats, the cast and extracting color channels will differ.