CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    103

    PictureBox, ImageList, Image, Bitmap

    I am trying to properly display a scaled version of an image in memory.
    It needs to have come from a bmp file.

    I read it into an ImageList at the moment, but prior to reading it in I need to set the number of bpp and its dimensions...

    This isn't quite what I need as I won't know the dimensions of the image until I'm reading it or have read it.

    So what class can I use to read the bmp file, get its dimensions, manipulate its pixels (GetPixel, SetPixel etc..) and display it in a picture box as a scaled representation of the image?

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: PictureBox, ImageList, Image, Bitmap

    I think you can use the Bitmap class to get more information about the image (e.g. dimensions, acces to individual pixels, etc). I would then use the Size and SizeMode attributes of the pictureBox to do the scaling.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured