Page 1 of 1

xbpBitmap()

Posted: Sat Sep 14, 2013 3:24 am
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.

Re: xbpBitmap()

Posted: Sun Sep 15, 2013 1:02 pm
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.