I'm try to figure out, how to make a new image (let's say width 2390 pixels and height 1990 pixels - image1) and then resize an image (let's say width 1195 and height 1990) - image2) make 2 copies of it and then place them combined on the new created image (image1). I can't figure out how to do it. I hope somebody can help me with a tip.
Sorry for the bad english
Regards Onier
How to make image composition
Re: How to make composition
Hi,
I give you a vb sample to open an image and draw it 2 time on a new empty image.
You can modify this code easily in order to draw other image at other positions:
Best regards,
Loïc
I give you a vb sample to open an image and draw it 2 time on a new empty image.
You can modify this code easily in order to draw other image at other positions:
Code: Select all
Dim nSrcImage As Long
Dim nImageCanvas As Long
Dim nCanvasHeight As Long, nCanvasWidth As Long
nCanvasHeight = 1990
nCanvasWidth = 2390
nSrcImage = Imaging1.CreateImageFromFile("input.jpg")
nImageCanvas = Imaging1.CreateNewImage(nCanvasWidth, nCanvasHeight, 32, White)
Imaging1.SetNativeImage (nImageCanvas)
Call Imaging1.DrawImage(nSrcImage, 0, 0, nCanvasWidth / 2, nCanvasHeight, InterpolationModeHighQualityBicubic)
Call Imaging1.DrawImage(nSrcImage, nCanvasWidth / 2, 0, nCanvasWidth / 2, nCanvasHeight)
Imaging1.SaveAsJPEG ("output.jpg")
Imaging1.CloseImage (nSrcImage)
Imaging1.CloseImage (nImageCanvas)
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest