Ich will Bereiche von Bildern kopieren und hab das geschrieben
wenn ich es so aufrufe funktioniert es auch:
so aber nicht:
wieso nicht? was ist da falsch?
VB.NET-Quellcode
- ''' <summary>
- Public Function GetImageArea(ByVal source As Bitmap, ByVal start As Point, ByVal areasize As Size) As Image
- Dim readyImage As New Bitmap(areasize.Width, areasize.Height)
- For x = start.X To start.X + areasize.Width - 1
- For y = start.Y To start.Y + areasize.Height - 1
- readyImage.SetPixel(x, y, source.GetPixel(x, y))
- Next
- Next
- Return readyImage
- End Function
wenn ich es so aufrufe funktioniert es auch:
so aber nicht:
wieso nicht? was ist da falsch?