Loading...

How to copy and pastle image

Example requests & Code samples for legacy GdPicture products (V 1-2-3-4-5 Series).

How to copy and pastle image

Postby walter » Wed Mar 19, 2008 4: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 4:28 pm

Re: How to copy and pastle image

Postby Loïc » Thu Mar 27, 2008 12: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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4447
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to Example requests for Gdpicture V 1-2-3-4-5 Series [Legacy]

Who is online

Users browsing this forum: No registered users and 0 guests

cron