Page 1 of 1

oPrn:SayBitMap

PostPosted: Wed Apr 05, 2006 1:59 am
by asito
Hi, I'm having a problem with the instruction:
oPrn:SayBitmap(x,y,cFile,nWidth,nHight,nScale)

The Bitmap I'm trying to print is a 250,70 pixels BMP. It displays it fine in the preview (oPrn:SayBitmap(1,1,cFile)) but in the printer is very small (about .5 x .5 cms.).
I calculate the horizontal and vertical resolution for 80 cols and 60 rows.

I had a routine in FW 1.9 that worked fine but now with FW 2.4 it is not working.
As a matter of fact it works fine with oReport:SayBitmap.

I haven't found any reference on how to use the nHight,nWidth and nScale parameters. Any suggestion ?

Advanced thanks for your attention.
Andres

PostPosted: Wed Apr 05, 2006 3:41 am
by Taiwan
Hi

you can use new Image.prg within FreeImage to modify your Printer.prg.

Regards,

Richard

oPrn:oSayBitMap

PostPosted: Wed Apr 26, 2006 9:30 pm
by asito
After several tests I found out that the parameters on the oSayBitmap work this way:

I have an bmp image 250,70 pixels, if I print it with oPrn:SayBitmap(1,1,'Image.bmp') it will be barely visible (about 1 cm).

You should play with these numbers to adjust the size you want. A 500,140 would show a decent logo.

On the oReport:SayBitmap() instruction, it works entirely different.

PostPosted: Sun Apr 30, 2006 1:13 am
by RAMESHBABU
Hi Asito

Have you tried the output on different printers with the same nWidth
and nHeight ?

I found the output is varying from printer to printer.

Can anybody suggest me what is the common mechanism to get a
constant output on any windows printer with the same program.

- Ramesh Babu P

PostPosted: Sun Apr 30, 2006 9:59 am
by Enrico Maria Giordano
Image sizes are in pixel but pixel sizes change from printer to printer. You have to calculate how many pixels are needed to cover a specific paper area:

oPrn:SayBitmap( 0, 0, "IMAGE.BMP", oPrn:nHorzRes() / 4, oPrn:nVertRes() / 8 )

EMG