none
Convert various graphic formats into a Bitmap format RRS feed

  • Question

  • I need to know how to convert images file (*.tiff,*.jgp...) into a bitmap format to manipulate the images.However the Bitmap class loads all type of graphics formats it gives wrongs with SetPixle() and GetPixel methods.The image from the loading in other format as bitmap are good when diplayed but not suitable. 

    thak for any answer.

    Thursday, April 3, 2014 2:41 PM

Answers

All replies

  • Hi Molokko,

    See how to convert images from one format to another. http://msdn.microsoft.com/en-us/library/twss4wb0(v=vs.90).aspx.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 4, 2014 5:34 AM
    Moderator
  • Thank you for the answer.I tryed unsucessfully this way.The fact is that the Bitmap.SetPixel and Bitmap.GetPixel don't work correctly with other format except the Bitmap format.

    here the code:

                        file = openFileDialog1.FileName;
                        System.Drawing.Image image = System.Drawing.Image.FromFile(file);
                        image.Save("test.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
                        image.Dispose();
                        image2 =new Bitmap("test.bmp");
                        pictureBox2.Image = image2;

    infact the image.SetPixel(X,Y,color) give impredicable results.

    Monday, April 14, 2014 12:41 PM