question in C# Winforms's Picture class

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

Renato,

What you would do is create a new Bitmap instance (which derives from
image). When you get that, you would get the Graphics instance for the
Bitmap (by calling the static FromImage method on the Graphics class). Once
you have that, you can copy a section of the larger image to the new bitmap
(through a call to the DrawImage method on the Graphics instance returned).

Hope this helps.
 
hi,

well i have this tile image which is 1 file compose of more than 10 tiles,
and i want to load just a portion of it. im creating a 2d map creator
(tiling)
in c#.

dont mind the computation. the question is just how.

thanks,

-renato
 
Thats amazing.
Nicholas must be psychic.
He managed to answer his question before he even asked it.
Wow.
JB :)
 
Back
Top