Hi all! I have CFbsBitmap object and I want to write it as bmp file !Please give me a way for do that ! thanks ! ============== doctin13113 !==================
Thanks all! I used "Save" function but my bmp file can't display on the computer because It isn't correct format .Please help me ! this my code :
void CHelloWorldPlusAppView::SaveL() { TRect rect = Rect(); CFbsBitmap* iBitmap=new(ELeave)CFbsBitmap(); //Create a bitmap from specified rect iBitmap->Create(rect.Size(),EColor256); CCoeEnv::Static()->ScreenDevice()->CopyScreenToBitmap(iBitmap,rect); iBitmap->Save(_L("c:\\system\\apps\\screen.bmp")); }
Thanks all! Hi all ! I can do that . And this my way !
void CHelloWorldPlusAppView::SaveL() { //Make a snapshot TRect rect = Rect(); iFileSaver->CreateL (KBmpFileName,&iClipFormat,&iCodec,&iCodec); iBitmap=new(ELeave)CFbsBitmap(); //Create a bitmap from specified rect iBitmap->Create(rect.Size(),EColor256); // Adapt with your display mode CCoeEnv::Static()->ScreenDevice()->CopyScreenToBitmap(iBitmap,rect); }
//This function is called when the gif file has been opened or an error has occured in the process void CHelloWorldPlusAppView::MiuoOpenComplete(TInt aError) { }
//This function is called whenever a conversion process has finished void CHelloWorldPlusAppView::MiuoConvertComplete(TInt aError) { }
//This function is called when the bitmap (output) file has been created void CHelloWorldPlusAppView::MiuoCreateComplete(TInt aError) { iFileSaver->ConvertL(*iBitmap); }
Forum posts: 28
TInt Save(const TDesC& aFilename);
Description
Saves the bitmap as a direct file store.
The file store overwrites any existing file with the same name.
Parameters
const TDesC& aFilename The name of the file.
Return value
TInt KErrNone if successful, otherwise another of the system-wide error codes.
Forum posts: 107
I used "Save" function but my bmp file can't display on the computer because It isn't correct format .Please help me ! this my code :
void CHelloWorldPlusAppView::SaveL()
{
TRect rect = Rect();
CFbsBitmap* iBitmap=new(ELeave)CFbsBitmap();
//Create a bitmap from specified rect
iBitmap->Create(rect.Size(),EColor256);
CCoeEnv::Static()->ScreenDevice()->CopyScreenToBitmap(iBitmap,rect);
iBitmap->Save(_L("c:\\system\\apps\\screen.bmp"));
}
Forum posts: 286
Cheers,
Sri
Forum posts: 107
How can I convert mbm file to bmp file by code . Don't use bmconv function command line. Please give me some way ! Thanks!
Forum posts: 28
Forum posts: 107
I can't access the web link .Please give me another way! Thanks!
Forum posts: 1419
I thought that was what the poster wanted, save a .bmp from his symbian program, by symbian code.
Not save an mbm and then convert it offline...
Forum posts: 107
Hi all ! I can do that . And this my way !
void CHelloWorldPlusAppView::SaveL()
{
//Make a snapshot
TRect rect = Rect();
iFileSaver->CreateL (KBmpFileName,&iClipFormat,&iCodec,&iCodec);
iBitmap=new(ELeave)CFbsBitmap();
//Create a bitmap from specified rect
iBitmap->Create(rect.Size(),EColor256); // Adapt with your display mode
CCoeEnv::Static()->ScreenDevice()->CopyScreenToBitmap(iBitmap,rect);
}
//This function is called when the gif file has been opened or an error has occured in the process
void CHelloWorldPlusAppView::MiuoOpenComplete(TInt aError)
{
}
//This function is called whenever a conversion process has finished
void CHelloWorldPlusAppView::MiuoConvertComplete(TInt aError)
{
}
//This function is called when the bitmap (output) file has been created
void CHelloWorldPlusAppView::MiuoCreateComplete(TInt aError)
{
iFileSaver->ConvertL(*iBitmap);
}