Home | About us | Overview | Softwares - Downloads | Evaluate | Order | Support | old forums | Contact | F.A.Q. | Documentations | Search | Sitemap

How to copy and pastle image

Example requests & Code samples for any GdPicture Softwares.

How to copy and pastle image

Postby walter on Wed Mar 19, 2008 5:35 pm

I am GdPicturePro4 and I am trying to develop a process that cut an image
And paste on another image, and that this image has sandwiched possibility of moving
With the mouse, with the possibility of putting in to fix the image anywhere on
Image superimposed.

What is the function that use of gdpicturepro4 to copy and paste?

What is the function that I use to move the pasted image with the mouse?

Thankful now,

David Ricardo Silva Moura
Brazil
walter
 
Posts: 1
Joined: Wed Mar 19, 2008 5:28 pm

Re: How to copy and pastle image

Postby Loïc on Thu Mar 27, 2008 1:10 pm

Hi,

There are several ways to perform this operation.

The sample I give below uses GetPixelArray1D() & SetPixelArray() methods.
It loads input1.jpg image, copies the rectangle of coordinate (0, 0, 100, 100) into arPixels() buffer then pastles the area to input2.jpg image :


Code: Select all
Dim arPixels() As Long

Imaging1.CreateImageFromFile ("input1.jpg")
Call Imaging1.GetPixelArray1D(arPixels, 0, 0, 100, 100)
Imaging1.CloseNativeImage
Imaging1.CreateImageFromFile ("input2.jpg")
Call Imaging1.SetPixelArray(arPixels, 0, 0, 100, 100)
Call Imaging1.SaveAsJPEG("output.jpg")
Imaging1.CloseNativeImage

Erase arPixels



Best regards,

Loïc Carrère
User avatar
Loïc
Site Admin
 
Posts: 1002
Joined: Tue Oct 17, 2006 11:48 pm
Location: France


Return to Example requests & Code samples

Who is online

Users browsing this forum: No registered users and 1 guest