SetNativeImage

Discussions about image processing and document imaging.
Post Reply
varcarme
Posts: 40
Joined: Tue Feb 05, 2008 8:56 pm

SetNativeImage

Post by varcarme » Thu Apr 19, 2012 4:12 pm

Hi

I'm just looking to convert from GDPicture Pro 5 to .NET...still using VFP at the moment.

I see there is no SetNativeImage function anymore...what is the alternative for switching between images?

Thanks in advance.

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

Re: SetNativeImage

Post by Loïc » Mon Apr 23, 2012 2:54 pm

Hello,

Which class are you taking about, GdViewer ?

Kind regards,

Loïc

varcarme
Posts: 40
Joined: Tue Feb 05, 2008 8:56 pm

Re: SetNativeImage

Post by varcarme » Mon Apr 23, 2012 4:13 pm

Hi Loïc

Yes...gdviewer

I'm using the imaging class to open a file and make a clone of it.

I'm then using gdviewer to display on screen

I allow the user to change brightness, contrast etc.

I thn wanted to give them the option of 'undoing' their changes....I thought the easiest way to do this would be to switch back to the cloned imageID?

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

Re: SetNativeImage

Post by Loïc » Mon Apr 23, 2012 4:15 pm

Hello again,

OK I see. SetNativeImage.GetNativeImage have been doped.
Now you have to use the DisplayFromGdPictureImage() method. This is the equivalent of the old GdViewer.SetNativeImage().

Let me know if you need other information.

Kind regards,

Loïc

varcarme
Posts: 40
Joined: Tue Feb 05, 2008 8:56 pm

Re: SetNativeImage

Post by varcarme » Tue May 01, 2012 1:12 pm

That all makes sense Loic.

Another problem I have is using the ARGB function

It throws up an error message: OLE error code 0x8013509: Unknown COM status code whenever I try to call it.

Code: Select all


oImaging   = CREATEOBJECT("gdpicture.gdpictureimaging")  

oImaging.SetLicenseNumber("XXXX") 

nImage = oImaging.CreateGdPictureImageFromFile("c:\test.jpg") 

oImaging.SetTransparency(nImage, oImaging.ARGB(255,0,255,0))

Don't know if this is just related to VFP / Active-X?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest