xbpBitmap()

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 579
Joined: Thu Feb 11, 2010 1:39 pm

xbpBitmap()

#1 Post by unixkd »

Hi all,

I have a small function below to transfer a set of photo stored in a field ADS type IMAGE to another field BINARY in the same table. The function below will store the first record photo into the second record and generally nth record photo into n+1th record. Record number 1 of the BINARY field is empty. the reason is that :setbuffer() of xbpBitmap() class returns the old buffer.

Can I get something like BitMapGetBuffer function to retrieve the current buffer or any other workaround ?

Static Function _UpdatePhoto()
Local oImage := XbpBitmap():new():create()
Do While !Eof()
IF DC_RecLock()
FIELD->PHOTO2 := oImage:setBuffer(PHOTO->Photo,XBPBMP_FORMAT_JPG,XBPBMP_DEF_COMPRESSION)
EndIf
DBSkip()
Enddo
Return nil

Thanks

Joe.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: xbpBitmap()

#2 Post by Auge_Ohr »

unixkd wrote:Can I get something like BitMapGetBuffer function to retrieve the current buffer or any other workaround ?
o:setBuffer() without Parameter did return active XbpBitmap-Objekts Buffer.
greetings by OHR
Jimmy

Post Reply