New image creation from other images

Example requests & Code samples for GdPicture Toolkits.
Post Reply
cicognani
Posts: 1
Joined: Tue Jan 20, 2009 6:28 pm

New image creation from other images

Post by cicognani » Wed Jan 21, 2009 6:37 pm

Good morning

We have a folder called "imagesource" containing images

IMAGE1 (200 x 100 pixel)
IMAGE2 (200 x 100 pixel)
IMAGE3 (200 x 100 pixel)
and another folder containing images (called "logosources")

IMAGE4 (200 x 15 pixel)
IMAGE5 (200 x 15 pixel)
IMAGE6 (200 x 15 pixel)

We need to choose one or more images from "imagesource" folder (ie:
image1) and ONE image from "logosources" (ie: image4).
After this we choose "UP" or "DOWN" option.

If we choose "UP" option a new image (200 x (100+15) pixel) composed
by image1 UP and image4 DOWN should be generated.
If we choose "DOWN" option a new image (200 x (100+15) pixel) composed by
image1 DOWN and image4 UP should be generated.

Please, can you provide a sample or source code for this?

Best regards
Vittorio Cicognani

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: New image creation from other images

Post by Loïc » Thu Jan 22, 2009 12:03 pm

Hi,

Here a way to draw image1 & Image4 on a new image:

Code: Select all

Dim Image1 As Integer = Imaging1.CreateGdPictureImageFromFile("c:\images\image1.bmp")
Dim Image4 As Integer = Imaging1.CreateGdPictureImageFromFile("c:\images\image4.bmp")
Dim NewImage As Integer = Imaging1.CreateNewGdPictureImage(200, 115, 24, Color.White)

Imaging1.DrawGdPictureImage(Image4, NewImage, 0, 0, 200, 15, InterpolationMode.InterpolationModeNearestNeighbor)
 Imaging1.DrawGdPictureImage(Image1, NewImage, 0, 15, 200, 100, InterpolationMode.InterpolationModeNearestNeighbor)
Imaging1.SaveAsBMP(NewImage, "c:\images\newimage.bmp")

Imaging1.ReleaseGdPictureImage(Image1)
Imaging1.ReleaseGdPictureImage(Image4)
Imaging1.ReleaseGdPictureImage(NewImage)
Hope this helps.

Best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests