Click here to Skip to main content
15,949,686 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))
    {
        g.DrawImage(
            image,
            new Rectangle(0, 0, size.Width, size.Height),
            new Rectangle(0, 0, image.Width, image.Height),
            GraphicsUnit.Pixel);
    }
    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 http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/5823e285-6999-40f5-b28a-74480a0acb13 but mouse.Location seems not appear in Net CF.
This link http://www.codeproject.com/KB/graphics/PanZoom2.aspx?msg=3876775#xx3876775xx is very excited but it didn't work on .Net CF.
Any suggestion for me?
Thank you very much..Phewww
Posted

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