Discussion:
PageScript PsBitMap()
(too old to reply)
m***@gmail.com
2017-10-13 16:58:41 UTC
Permalink
Hi,
I've Pagescript 4.2.0 (the last version of PS for Clipper).
In a old software of mine I use PSBitmap() to print a logo on the top of a document.
Reading the documentation I've found that omitting 3rd and 4th parameter, I can print the bitmap file in its original size, and that providing the nTransColor (6th) it's possible to have a transparent bmp.
I've tried several times with different bmp but the result is wrong: the printed bmp is very little (like a 32x32 icon) and it's not transparent using no matter what color.
There is anyone that has successfully used this function?


Many thank,
Marco
dlzc
2017-10-13 19:05:30 UTC
Permalink
Post by m***@gmail.com
Hi,
I've Pagescript 4.2.0 (the last version of PS for Clipper).
In a old software of mine I use PSBitmap() to print a logo
on the top of a document.
Reading the documentation I've found that omitting 3rd and
4th parameter, I can print the bitmap file in its original
size, and that providing the nTransColor (6th) it's possible
to have a transparent bmp.
I've tried several times with different bmp but the result
is wrong: the printed bmp is very little (like a 32x32
icon) and it's not transparent using no matter what color.
There is anyone that has successfully used this function?
So can you:
- verify that you are calling this function with the "path\filename" of the full size bitmap;
- show us how you are calling this function?

What happens is you supply reasonable numbers for parameter #3 and #4?

David A. Smith
m***@gmail.com
2017-10-13 19:36:26 UTC
Permalink
Hi David,
usually I'm calling the function this way
PSBitmap( nT, nL, nT + 22, 0, aLogo[ 1 ] )
3rd parameter is 0 and the image is scaled (according to docs) and printed,
while this way

PSBitmap( nT, nL, , , aLogo[ 1 ] )

doesn't work. The aLogo[1] contains the full path\fillname of the full size image. I've doubled cheched all the images properties and all of them are full size images.

Thanks,
Marco
Post by dlzc
Post by m***@gmail.com
Hi,
I've Pagescript 4.2.0 (the last version of PS for Clipper).
In a old software of mine I use PSBitmap() to print a logo
on the top of a document.
Reading the documentation I've found that omitting 3rd and
4th parameter, I can print the bitmap file in its original
size, and that providing the nTransColor (6th) it's possible
to have a transparent bmp.
I've tried several times with different bmp but the result
is wrong: the printed bmp is very little (like a 32x32
icon) and it's not transparent using no matter what color.
There is anyone that has successfully used this function?
- verify that you are calling this function with the "path\filename" of the full size bitmap;
- show us how you are calling this function?
What happens is you supply reasonable numbers for parameter #3 and #4?
David A. Smith
m***@gmail.com
2017-10-23 17:59:06 UTC
Permalink
Hi all,
sorry to bother....
To find a solution I've tried to recompile the demo program that comes with Pagescript for Clipper. I never done it in the past because an exe was provided with the libs. In order to see why I get this strange result I came to decision to recompile a source that wasn't touched by me (maybe there are errors in my code that i'm not able to find). The demo file is compiled, then linked with standard libraries and pscript lib, oslib and __wait_b.obj file. The output is 40kb smaller than the original (!) and when launched returns immediately to command prompt. I'm not able to find the reason of a such behaviour. Any help?
marco
dlzc
2017-10-23 20:03:16 UTC
Permalink
Post by m***@gmail.com
Hi all,
sorry to bother....
To find a solution I've tried to recompile the demo
program that comes with Pagescript for Clipper. I never
done it in the past because an exe was provided with
the libs. In order to see why I get this strange result
I came to decision to recompile a source that wasn't
touched by me (maybe there are errors in my code that
i'm not able to find). The demo file is compiled, then
linked with standard libraries and pscript lib, oslib
and __wait_b.obj file. The output is 40kb smaller than
the original (!) and when launched returns immediately
to command prompt. I'm not able to find the reason of
a such behaviour. Any help?
What are the contents of the error log file, after running it?

If you open a command.com (not cmd.exe) window, and execute either program, what error message is displayed on the screen?

I suggest that this is a sign that your code-base has come to the end of its life, and it is time to either:
- migrate it to (x)Harbour, or X#, or
- recode in a current language that you are familiar with, just using your old code for "business logic".

David A. Smith

Loading...