Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42412

Copying Bitmap onto Another Bitmap

$
0
0
I am copying part of one Bitmap onto another Bitmap, however when I do this, it prints the bitmap in a large size and at a higher position.

It looks like a ratio difference between the two objects is causing this to happen.

How do I make it print the same size and position without it changing the size?



Code:

            Dim fr_bm As New Bitmap(ImagePath & "\tiles.bmp")
            Dim gr As Graphics = Graphics.FromImage(FullBackground)

            Dim fr_rect As New Rectangle(TileX, TileY, TileWidth, TileWidth)
            Dim to_rect As New Rectangle(WorldX, WorldY, TileWidth, TileWidth)

            gr.DrawImage(fr_bm, to_rect, fr_rect, GraphicsUnit.Pixel)


Viewing all articles
Browse latest Browse all 42412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>