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