Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Transparent for WMF

edited June 2002 in General
If i use a wmf-grafic with a transparent background (i controlled in
delphi), and set the transparent property of the graphics-object in RB, its
not handled correct. On the printer its printed with white backround (tested
on Postscript, also pcl-printer) and on the screen its in mixed color if the
underlaying area is a color instead of white.

any idea?

chris

Comments

  • edited June 2002
    In general, WMFs do not support transparency. Use Bitmaps instead.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    i could send you an transparent wmf (with no background).
    Made in Powerpoint. The benefit is, that those graphics are very small
    instead of bitmaps with 150 DPI. Also Bitmaps are depending on the
    resoulution of the target device, so the printerdriver always resamples the
    bitmap to scale it.

    chris

    "Alexander Kramnik (Digital Metaphors)" schrieb
    im Newsbeitrag news:3d1c871f$1@dm500....
  • edited July 2002
    Sure, send it to support@digital-metaphors.com and I'll be happy to try it
    out.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited July 2002
    i had send the WMF (J0251301.WMF) to the RB supportmail-address.
    thank you
    chris


    "Alexander Kramnik (Digital Metaphors)" schrieb
  • edited July 2002
    WMFs do not store alpha values so it is not possible to do true
    transparency. The way PowerPoint handles this, I think, is it uses the first
    pixel in the array as the transparent color, in this case white. It then
    creates a mask (in this case the mask would surround all the non-white
    pixels in the image), and gives the bits in the mask an alpha of zero and
    the bits outside the mask an alpha of one, thus creating an illusion of a
    transparent background when rendered. You can take a look at the Draw method
    of TBitmap which does essentially the same thing. Unfortunately, RB does not
    do anything this elaborate. RB handles transparency by simply rendering the
    image to the canvas using the SrcAnd operator which in essence treats the
    pixel values themselves as alpha values (they play a double role). Therefore
    in instances like this you do not get the expected behavior like you are
    seeing in PowerPoint.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited July 2002
    I have a situation where I am trying to print a transparent bitmap and
    everything works fine. The preview looks great but when I try to print the
    program hangs. I have to forcibly exit the application.

    Any suggestions? Thanks.

    "Alexander Kramnik (Digital Metaphors)" wrote
    in message news:3d1c871f$1@dm500....
  • edited July 2002
    Most printers do not support transparency very well, if at all. Install the
    latest pritner driver available and try toggling DirectDraw to true on the
    TppImage component.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.