Click here to Skip to main content
15,902,939 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi all!
I want to write a project for viewing image on pocket pc. I try to googling, and I knew that .Net CF didn't support GDI+. There are some project about panning and zooming on Net Framework but it only worked on GDI+. I tried to use code bellow to resize image:
public static Image Resize(Image image, Size size)
    Image bmp = new Bitmap(size.Width, size.Height);
    using (var g = Graphics.FromImage(bmp))
            new Rectangle(0, 0, size.Width, size.Height),
            new Rectangle(0, 0, image.Width, image.Height),
    return bmp;

I had some problems with them. With image 800x600 or 1024x768, it worked very slowly and threw exception out of memory. About panning, I see this link but mouse.Location seems not appear in Net CF.
This link is very excited but it didn't work on .Net CF.
Any suggestion for me?
Thank you very much..Phewww

1 solution

i don't know if it will help for this particular problem, but you might want to take a look at OpenNETCF.
good luck!
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900