From: molistok on
Hi,
I need print a bitmap with transparency, I am using a function of
CImage TransparentBlt and this works fine in a lot of printer devices
and the bitmaps are displayed fine in the screen. However in some
printer devices TransparentBlt function return false and therefore the
image is no printed.

How can I know if one printer will print with transparency or not?
Why in some printer devices TransparentBlt fail?


I am comparing the values that function GetDeviceCaps are returning in
a printer device that it print the bitmaps with transparency fine with
other printer than the TransparentBlt fail and I only can see
difference in this parameters:

Printer ok Printer fail

LOGPIXELSX 600 1200
LOGPIXELSY 600 1200
ASPECTX 600 1200
ASPECTY 600 1200
ASPECTXY 846 1696
HORZRES 4958 9917
VERTSIZE 7016 14031

For example in this parameter GetDeviceCaps return the same in both
printers:

Printer ok Printer fail
SHADEBLENDCAPS 0 0

Can any help me please?

Thanks.
From: Joseph M. Newcomer on
I was going to suggest using GetDeviceCaps to see if TransparentBlt is supported, but in
fact there is no flag for that (I just checked). A number of printers, including my
high-end PostScript printer, don't seem to support alpha blending.

I would have expected to find this in the RASTERCAPS option of GetDeviceCaps, but
according to the latest documentation this is not a supported query. you should probably
report this as a bug.
joe


On Mon, 22 Mar 2010 01:37:51 -0700 (PDT), molistok <molistok(a)gmail.com> wrote:

>Hi,
>I need print a bitmap with transparency, I am using a function of
>CImage TransparentBlt and this works fine in a lot of printer devices
>and the bitmaps are displayed fine in the screen. However in some
>printer devices TransparentBlt function return false and therefore the
>image is no printed.
>
>How can I know if one printer will print with transparency or not?
>Why in some printer devices TransparentBlt fail?
>
>
>I am comparing the values that function GetDeviceCaps are returning in
>a printer device that it print the bitmaps with transparency fine with
>other printer than the TransparentBlt fail and I only can see
>difference in this parameters:
>
> Printer ok Printer fail
>
>LOGPIXELSX 600 1200
>LOGPIXELSY 600 1200
>ASPECTX 600 1200
>ASPECTY 600 1200
>ASPECTXY 846 1696
>HORZRES 4958 9917
>VERTSIZE 7016 14031
>
>For example in this parameter GetDeviceCaps return the same in both
>printers:
>
> Printer ok Printer fail
>SHADEBLENDCAPS 0 0
>
>Can any help me please?
>
>Thanks.
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: phil oakleaf on
molistok wrote:
> Hi,
> I need print a bitmap with transparency, I am using a function of
> CImage TransparentBlt and this works fine in a lot of printer devices
> and the bitmaps are displayed fine in the screen. However in some
> printer devices TransparentBlt function return false and therefore the
> image is no printed.
>
> How can I know if one printer will print with transparency or not?
> Why in some printer devices TransparentBlt fail?
>
>
> I am comparing the values that function GetDeviceCaps are returning in
> a printer device that it print the bitmaps with transparency fine with
> other printer than the TransparentBlt fail and I only can see
> difference in this parameters:
>
> Printer ok Printer fail
>
> LOGPIXELSX 600 1200
> LOGPIXELSY 600 1200
> ASPECTX 600 1200
> ASPECTY 600 1200
> ASPECTXY 846 1696
> HORZRES 4958 9917
> VERTSIZE 7016 14031
>
> For example in this parameter GetDeviceCaps return the same in both
> printers:
>
> Printer ok Printer fail
> SHADEBLENDCAPS 0 0
>
> Can any help me please?
>
> Thanks.
I found the whole area of bitmaps to printers to be a bit troublesome -
especially with SRCAND, Transparent bitmaps.

To get around it I sometimes create a memory bitmap, do all the SRCAND
or transparent on that then finally bitBlt the memory bitmap to the printer.

That way you can be sure the printer driver is not getting "creative"
with your work

Phil