如何Symbian下如何处理非文件的CFbsBitmap图像显示及处理
在Symbian中如果要进行图像相关的操作,就必须使用CFbsBitmap来进行相关操作。而Symbian得这种图像格式是不公开的,因此在显示之前都是使用CImageDecoder进行适当的转换,但是在使用过程中,我发现这个类只能处理存储在磁盘上的文件,并把它进行转换。当然,在绝大多数情况下我们都是把磁盘上的图像文件拿过来进行显示,但是也有很多情况,图像经过处理是在内存中存在,并没有进行保存,比如我们从网络上下载的图像,或者我们自定义情况下的图像处理过程,还有就是大量的游戏中的图像处理。
在Nokia论坛有很多讨论
http://discussion.forum.nokia.com/forum/showthread.php?t=32326&highlight=InternalizeL+CFbsBitmap
但是貌似还没有得到合适的方法
经过查阅资料我发现有一个类可以很方便地解决这个问题
CBufferedImageDecoder
OpenL()
void OpenL(const TDesC8& aSourceData, const TDesC8& aMIMEType, const CImageDecoder::TOptions aOptions=CImageDecoder::EOptionNone);
Description
Creates a decoder for the image in the source buffer.
The plugin decoder to use is determined by the specified MIME type (aMIMEType). If an appropriate plugin decoder is found it is used to scan the beginning of the image.
If no appropriate plugin decoder can be found this function leaves with KEComErrNoInterfaceIdentified.
这样们就可以把图像首先读取成HBuf8,在用Open打开,进行转换。
这样就可以解决很多问题。
---------------------
zesky
版权所有
www.symbian-security.cn
在Nokia论坛有很多讨论
http://discussion.forum.nokia.com/forum/showthread.php?t=32326&highlight=InternalizeL+CFbsBitmap
但是貌似还没有得到合适的方法
经过查阅资料我发现有一个类可以很方便地解决这个问题
CBufferedImageDecoder
OpenL()
void OpenL(const TDesC8& aSourceData, const TDesC8& aMIMEType, const CImageDecoder::TOptions aOptions=CImageDecoder::EOptionNone);
Description
Creates a decoder for the image in the source buffer.
The plugin decoder to use is determined by the specified MIME type (aMIMEType). If an appropriate plugin decoder is found it is used to scan the beginning of the image.
If no appropriate plugin decoder can be found this function leaves with KEComErrNoInterfaceIdentified.
这样们就可以把图像首先读取成HBuf8,在用Open打开,进行转换。
这样就可以解决很多问题。
---------------------
zesky
版权所有
www.symbian-security.cn
Labels: CBufferedImageDecoder, CFbsBitmap, Symbian
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home