Page 1 of 1

Imprimir una imagen por medio del preprocesador

PostPosted: Sat Sep 23, 2017 4:39 am
by noe aburto
Saludos

tengo esta intruccion como preprocesador para imprimir imagenes JPG, pero al correrla me marca errores,
alguna ayuda?....


Code: Select all  Expand view

#command IMPRIME IMAGEN <cImagen> POS <nRow>,<nCol>;
                                  SIZE <nWidth>,<nHeight> EN <Reporte>;
                => <Reporte> := ImprImagen(<Reporte>,<cImagen>,<nRow>,<nCol>,<nWidth>,<nHeight>)

codigo fuente de prueba

imprime imagen 'c:\tmp\banorte.jpg' pos nRen+4,0 size 150,80 en oPrn


// --- Impresion de una imagen
function ImprImagen(OBJ_PRINT,cImagen,nRow,nCol,nWidth,nHeight)
local oImage

if File(cImagen)
 @ nRow,nCol IMAGE oImage FILE cImagen SIZE nWidth,nHeight OF OBJ_PRINT ADJUST
 oImage:Progress( .f. )
 oImage:LoadBmp(cImagen)
 oImage:Refresh()
 oImage:SaveImage(cImagen,2)
endif
return NIL
 



Gracias