sanjay6036

Hi All ,
Can aybody tell me how i can convert Byte array to images .I do not have any idea regarding this . and how i can perform Scaling on images ....please i waiting for your reply..



Re: Smart Devices Native C++ Development Byte Array to Image..

Hammadi Dali


Hi
You can use the method Bitmap.SetPixel

Regards
Hammadi




Re: Smart Devices Native C++ Development Byte Array to Image..

Christopher Fairbairn

Hi,

sanjay6036 wrote:
Can aybody tell me how i can convert Byte array to images .I do not have any idea regarding this . and how i can perform Scaling on images ....please i waiting for your reply..

What is the format of the data in your byte array

Is this raw RGB or BGR data, or does the byte array contain some other type of image such as a PNG or BMP encoded image

The solution to your problem will depend upon the type of image data your byte array contains.

Hope this helps,

Christopher Fairbairn.






Re: Smart Devices Native C++ Development Byte Array to Image..

sanjay6036

H All,

Thanks For Reply..i am getting image in .png Format .please tell me with some details because i do not have too much idea about pocketpc

i am telling in detail...i am getting images through XML and i have to show these images on Screen ..how i can show these image on the screen .Please reply me ,, i am waiting for replies...






Re: Smart Devices Native C++ Development Byte Array to Image..

Christopher Fairbairn

Hi,

sanjay6036 wrote:
Thanks For Reply..i am getting image in .png Format .please tell me with some details because i do not have too much idea about pocketpc

If you are targeting Windows Mobile 5.0 or above you may like to use the IImagingFactory::CreateImageFromBuffer method (http://msdn2.microsoft.com/en-us/library/aa915465.aspx) which is part of the Imagining Component.

It will return you a reference to an IImage interface that would allow you to call it's Draw method (http://msdn2.microsoft.com/en-us/library/aa915197.aspx) to draw the image to any device context you may have.

A post which shows you the general structure of how to use this API can be found at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1113975&SiteID=1

Hope this helps,

Christopher Fairbairn






Re: Smart Devices Native C++ Development Byte Array to Image..

sanjay6036

Thanks For giving me a usefull solution. i am getting images from server which are incoded into BASE64 ,please tell me should i decode it into base64 or i can display it diretlly .

can you tell me functions for decding ..please tell me i am waiting for your reply ..

please reply me so that i cn solve my problem ...