oPrn:SayBitMap

Post Reply
asito
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

oPrn:SayBitMap

Post 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
User avatar
Taiwan
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan
Contact:

Post by Taiwan »

Hi

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

Regards,

Richard
asito
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

oPrn:oSayBitMap

Post 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.
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post 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
Post Reply