I’m using the following code to draw small image on a big image, but it has white lines,
Bitmap bitmap = new Bitmap(1000, 1000);
Graphics graphic = Graphics.FromImage(bitmap);
Bitmap bitmap1 = new Bitmap(256, 256);
Graphics g1 = Graphics.FromImage(bitmap1);
g1.FillRectangle(new SolidBrush(Color.Red), new Rectangle(-10, -10, 300, 300));
g1.Flush();
graphic.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half;
graphic.DrawImage(bitmap1, new RectangleF(0f, 313.5f, 256, 256));
graphic.DrawImage(bitmap1, new RectangleF(0f, 569.5f, 256, 256));
bitmap.Save("1.png");
Process.Start("1.png");
could someone told me why this happen?
the tile.png is an image in 256X256 with red color filled.
Try the following code