locked
How to convert and Save JPG to BMP image? RRS feed

  • Question

  • Hi All

    How to convert and Save (to Hard disk) JPG to BMP image using Imaging Interface in Windows Mobile? Sample code would really help.

    Thnaks in Advance.

    Regards
    Phegde
    Wednesday, May 6, 2009 2:49 PM

Answers

  • Hi PHegde,

    Please check the following code:

    Bitmap bitmap= new Bitmap("hi.jpg");  
    bitmap.Save("testimage32.jpg", System.Drawing.Imaging.ImageFormat.Bmp);


    Please let me know if it does not suit for your requirement.

    Regards,
    Malleswar

    Wednesday, May 6, 2009 3:19 PM
  • Hi PHegde,

    If you are reading .jpg file you can convert it in bmp format, .Net CF Imaging class supported using ImageFormat (.Gif, .Png, .Bmp, jpeg) format.


    use this code snippet:

    Bitmap m_bmpOffScreen = new Bitmap(@"\Storage Card\temp.jpg");

    m_bmpOffScreen.Save(@"\Storage Card\temp.bmp",ImageFormat.Bmp);



    Hope this may be help.




    Pavan Pareta | If you find my post is helpful for you then mark as a answer.
    Wednesday, May 6, 2009 6:28 PM

All replies

  • Hi PHegde,

    Please check the following code:

    Bitmap bitmap= new Bitmap("hi.jpg");  
    bitmap.Save("testimage32.jpg", System.Drawing.Imaging.ImageFormat.Bmp);


    Please let me know if it does not suit for your requirement.

    Regards,
    Malleswar

    Wednesday, May 6, 2009 3:19 PM
  • Hi PHegde,

    If you are reading .jpg file you can convert it in bmp format, .Net CF Imaging class supported using ImageFormat (.Gif, .Png, .Bmp, jpeg) format.


    use this code snippet:

    Bitmap m_bmpOffScreen = new Bitmap(@"\Storage Card\temp.jpg");

    m_bmpOffScreen.Save(@"\Storage Card\temp.bmp",ImageFormat.Bmp);



    Hope this may be help.




    Pavan Pareta | If you find my post is helpful for you then mark as a answer.
    Wednesday, May 6, 2009 6:28 PM