Loading...

GDViewer OCX in Powerbuilder - extract the image?

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

GDViewer OCX in Powerbuilder - extract the image?

Postby omatic » Fri Jul 11, 2008 7:23 pm

I am currently evaluating the GDViewer OCX for an application in Powerbuilder 10.2. I have been having good luck displaying images using the DisplayFromByteArray method. However, now I need the flip-side to this situation, extracting the byte array, but I am having little success.

Hypothetical situation:
1. Load an image into the OCX using DisplayFromByteArray (successful). The ByteArray supplied is a Powerbuilder blob variable.
2. Call OCX's rotate90() method to rotate the image (successful; image is rotated).
3. Obtain ByteArray back from OCX into a Powerbuilder blob (how?)

It's that third step messing me up. I see the GetHBitmap in the reference materials, but how do I convert this to a blob? Or is there a simpler, more direct way to do this?

This seems so straightforward, there must be a way. Thanks in advance for your help.
omatic
 
Posts: 2
Joined: Fri Jul 11, 2008 7:15 pm

Re: GDViewer OCX in Powerbuilder - extract the image?

Postby Loïc » Sun Jul 13, 2008 2:32 pm

Hi,

The GdViewer doesn't provide extended functions to export data of the displayed image.

The functions are provided by the GdPicture Pro component wich include the GdViewer control and an Imaging class.
If you want to get an upgrade from GdViewer to GdPicture Pro you can contact our sales departement at esales (at) gdpicture (dot) com in order to get a coupon reduction.

However, maybe you can find a fast way to create image blob data from an hbitmap using powerbuilder ? For that, I suggest you to ask the question to a powerbuilder support newsgroup or forum.

Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GDViewer OCX in Powerbuilder - extract the image?

Postby omatic » Mon Jul 14, 2008 4:32 pm

>> GdViewer doesn't provide extended functions to export data
Thanks for the clarification. It took me a while to notice your feature-comparison page but I see that's on there, too.

>> maybe you can find a fast way to create image blob data from an hbitmap
I have been searching for just that kind of technique. It's probably possible but I haven't found a way yet. From what I HAVE found, I'm sure it involves a lot of API/GDI calls, and working with device contexts, but I'm not too keen on going that way. It's not my area of expertise and I only have so much time for trial-and-error.

If there's a simpler way to get the BLOB from the handle, I'm all ears, I encourage anybody with such knowledge to chime in! In the meantime, I'll work around it somehow.

Thanks,
omatic
omatic
 
Posts: 2
Joined: Fri Jul 11, 2008 7:15 pm


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest