CFbsBitmap storing to stream
| Thu, 2005-08-04 10:28 | |
|
Hello
If I use method CFbsBitmap::Save(filename), It work's corectly. But I need store CFbsBitmap to stream (stream is open to file) so i open stream RWriteStream::Create(RFS, filename, iFlags) RWriteStream::Open(RFS, filename, iFlags) Stream to file is open Now I wanna store CFbsBitmap to stream I use CFbsBitmap::ExternalizeL(RWriteStream) It store some data almost the same amout like CFbsBitmap::Save(filename) Something missing, probaply header or Could you advise how to store CFbsBitmap to stream and after that I can use mbmviewer from SDK and I can see it? Thanks |
|






Forum posts: 142
What is the excat problem that you are having ? any erro notes. I have used dictionary stored succesfully with bitmaps, so maybe you should try them as well.
yucca
Forum posts: 8
But result of
RWriteStream::Create(RFS, filename, iFlags)
RWriteStream::Open(RFS, filename, iFlags)
CFbsBitmap::ExternalizeL(RWriteStream)
is not save like
CFbsBitmap::Save(filename)
So please if I start
RWriteStream::Create(RFS, filename, iFlags)
RWriteStream::Open(RFS, filename, iFlags)
what next? how to save CFbsBitmap to stream
after for test I will use
CFbsBitmap::Load(filename)
Thanks
Forum posts: 142
yucca
Forum posts: 1134
but some internal format that only CFbsBitmap::Internalize understand. (or someone reverse enginering it).
You need to rethink your file strategy. Externalize/Internalize is mainly used when you want to pack several types of data into one file, its not ment to write any particular file standard, just any data that Internalize would need to recreate the object.
If you want to write several of your CFbsBitmap(s) in a .mbm, take a look at the CFbsBitmap::StoreL function instead.
If you only want one, why not use CFbsBitmap::Save?
If you want to create your own fileformat, go with Externalize/Internalize