oPrn:SayBitMap

oPrn:SayBitMap

Postby asito » Wed Apr 05, 2006 1: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
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

Postby Taiwan » Wed Apr 05, 2006 3:41 am

Hi

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

Regards,

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

oPrn:oSayBitMap

Postby asito » Wed Apr 26, 2006 9: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.
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

Postby RAMESHBABU » Sun Apr 30, 2006 1: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
User avatar
RAMESHBABU
 
Posts: 615
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby Enrico Maria Giordano » Sun Apr 30, 2006 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8378
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 2 guests