FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper oPrn:SayBitMap
Posts: 10
Joined: Fri Nov 25, 2005 09:08 PM
oPrn:SayBitMap
Posted: Wed Apr 05, 2006 01:59 AM

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

Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
oPrn:SayBitMap
Posted: Wed Apr 05, 2006 03:41 AM

Hi

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

Regards,

Richard

Posts: 10
Joined: Fri Nov 25, 2005 09:08 PM
oPrn:oSayBitMap
Posted: Wed Apr 26, 2006 09:30 PM

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.

Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
oPrn:SayBitMap
Posted: Sun Apr 30, 2006 01:13 AM

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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
oPrn:SayBitMap
Posted: Sun Apr 30, 2006 09:59 AM

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

Continue the discussion