Hi,
I have found a piece of code that loads a single image and creates a new, resized bitmap to put it as a the Form1 background. The reason I don't simply use the stretch property is, this code prevents the blur effect, so there remains no deviated green from the GreenScreen process.
The thing is, my form is for an animated video game character, and it loads a whole bunch of transparent images. What I want is, instead of using one preselected image, create a new bitmap from the actual loaded background image of the form, every time an image is loaded.
My actual code is:
Imports System.Drawing.GraphicsImports System.DrawingPublicClass Form1Dim BackgroundImage1 As BitmapDim BmpNew As BitmapPrivateSub Form1_Paint(ByVal sender AsObject, ByVal e As System.Windows.Forms.PaintEventArgs) HandlesMe.Paint
BackgroundImage1 = New Bitmap("E:\Pictures\noise3.jpg", True)
BmpNew = New Bitmap(BackgroundImage1.Width * 4, BackgroundImage1.Height * 4)Dim g As Graphics g = Graphics.FromImage(BmpNew) g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half g.DrawImage(BackgroundImage1, 0, 0, BmpNew.Width, BmpNew.Height) e.Graphics.DrawImage(BmpNew, 0, 0)EndSub
EndClass
Thanks in advance.