The OBMPLOADFROMSTR I already solved with xIMAGE.
Please note that you can easily do it with both TXImage and also TBitmap.
I'm missing GPRNSAYIMAGE that allows you to print image from BLOB field, how do you do it now to avoid using freeimage.dll
Do you want to print on a printer?
Use this command from print.ch:
#xcommand @ <nRow>, <nCol> PRINT TO <prn> IMAGE <img> ;
[SIZE <nWidth> [,<nHeight>] ] ;
[<unit: PIXEL,MM,CM,INCHES>] ;
[<lStr: STRETCH>] ;
[ ALPHALEVEL <nAlpha>] ;
[<lNoTrn: NOTRANSPARENT>] ;
[<lGray: GRAY> ] ;
[LASTROW <lrow>] ;
This is a sample to test:
#include "fivewin.ch"
function Main()
local oCn := FW_DemoDB()
local oRs, nRow, oPrn, oFont
MsgRun( "Reading Images Table", "PLEASE WAIT", ;
{ || oRs := oCn:RowSet( "wwonders" ) } )
nRow := 1 // 1 INCH
PRINT oPrn PREVIEW
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-20 OF oPrn
PAGE
oRs:GoTo( 8 )
@ nRow,2 PRINT TO oPrn IMAGE oRs:Image SIZE 4,4 INCHES NOTRANSPARENT LASTROW nRow
nRow += 0.25
@ nRow,2 PRINT TO oPrn IMAGE oRs:Image SIZE 4,4 INCHES ALPHALEVEL 128 LASTROW nRow
nRow += 0.2
@ nRow,1 PRINT TO oPrn TEXT "FWH" + CRLF + "Image Printing" + CRLF + "Capabilities" ;
SIZE 6,2 INCHES ALIGN "" FONT oFont
ENDPAGE
ENDPRINT
RELEASE FONT oFont
oRs:Close()
oCn:Close()
return nil
In the command, the image can be (a) file name, (b) resource name, (c) blob, (d) hBitmap, (e) hMeta, (f) hIcon, (g) pImage, (k) Symbol, (l) FW Shape, (m) web-address of any image or (n) image info read by FW_ReadImage. Image format can be bmp, png, gif, ico, cur, jpg, emf, wmf, tif.
Row, column, width and height can be specified in inches, mm or pixels. Images are automatically resized to the dimensions specified.
Alpha printing may not be supported by all printers.