JPEGs on CE .NET

G

Guest

I am trying to port a pure win 32 desktop (Windows XP) application to a
Windows CE .NET Ver 4.2 running on a Intel Arm Xscale processor. This is
totally new to me
and so far, most of the things have been porting ok, except for the JPEG
images. On XP version, I am using the following calls to render the JPEGS:

CreateFile()
ReadFile() //to read to a byte buffer
CreateStreamOnHGlobal() //read to a stream
OleLoadPicture() //load it to a IPicture object
IPicture::Render() //render it

On CE, OleLoadPicture function is not available. I tried in vain to find any
CE equivalents of this function.

Can any of you guys tell me if there is an equivalent function or if its a
totally different approach on CE. If so, what's the best place to look for
some relevant information and samples. Thanks so much.

-raj
 
C

Chris Tacke, eMVP

Use the Bitmap/Image constructor. It takes the path to the image file.

Bitmap bmp = new Bitmap("pathtomyimage");

-Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top