Loading...

Get displayed picture as array....

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Get displayed picture as array....

Postby sarzan » Tue Aug 28, 2007 12:52 pm

i need to get the current displayed picture as byte array of a 24bpp bmp image.

Is possible with gdViewer (wich version) ? or if not... is possible with gdPicture (wich version) ?
sarzan
 
Posts: 25
Joined: Thu Jul 05, 2007 12:07 pm
Location: Florence - Italy

Postby Loïc » Wed Aug 29, 2007 12:35 pm

Hi,

You can get this functionality into the GdPicture Light and into GdPicture PRO OCX:

http://www.gdpicture.com/references/gdp ... Array.html

Ex in vb6:

Code: Select all
dim nBytesRead as long
dim arBytes() as byte
dim oGdPicture as new GdPicturePro.cGdPicture

oGdPicture.SetNativeImage(GdViewer1.GetNativeImage())
oGdPicture.SaveAsByteArray(arBytes(), nBytesRead, "bmp")
...



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

Postby sarzan » Wed Aug 29, 2007 12:52 pm

Ok i already find it.

I also add a:

oGdPicture.ConvertTo24Bpp

before

oGdPicture.SaveAsByteArray

to be sure the array is of a 24bpp BMP image. Right ?
sarzan
 
Posts: 25
Joined: Thu Jul 05, 2007 12:07 pm
Location: Florence - Italy

Postby Loïc » Wed Aug 29, 2007 1:35 pm

Code: Select all
Right ?


Yes !
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


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest