none
How do I set the transparency color for a PNG file?

    Question

  • I have a bitmap I loaded, but when I display it through Silverlight it is not transparent.

    How, using Designer, can I specify what color is the transparent color?

    I looked through the docs but didn't see this question addressed.

    Thanks.
    • Edited by Snowman321 Wednesday, March 26, 2008 5:42 PM typos
    Wednesday, March 26, 2008 5:35 PM

Answers

  • (I think the concept behind the post is that of appreciating where ED uses white background as white and where white represents transparent. Besides JPG will also render out transparent as white.)

    Try:

    1 - imported bitmap on one layer

    2 - grab any of the pens or shape tools and draw shapes over the sections intended to be transparent.

    3 - fill the shapes with a solid colour then switch to Erase blend mode

    4 - export the image to PNG format

    Complexifying
    a - gradients of the same colour but with different opacity settings allow for background fades

    b - live effects will/should also give some subtle effects under Erase blend mode

    c - pattern fills with Erase blend mode can give some great results

    Thursday, March 27, 2008 9:29 AM

All replies

  • If I understand correctly you want to be able to take a bitmap image and render a particular color of that bitmap as transparent and save it as a PNG. The only thing that comes close to doing what you're after is to create an auto-trace of the imported bitmap, delete the pieces of the autotrace that you want gone and then export it out as a PNG. The quality of the auto-trace, however is limited to 128 colors. So this isn't going to be possible with Expression Design. Remember that Expression Design is intended as a Vector design/vector editiong tool. You can easily accomplish transparency with vector objects, but not with bitmaps.

    Bitmap editing is one of the most requested features of Expression Design and I'll be sure to add this as a request to the feature request list.

    Will Buffington
    Microsoft Expression Support
    Wednesday, March 26, 2008 11:20 PM
    Moderator
  • Yep, I ended up using Photoshop. Using their magic wand tool, I cut away the sections I wanted to be transparent from the image. Now, the PNG file renders transparent in Silverlight.

    I was hoping there was a way to do this in Expression Designer though.
    Wednesday, March 26, 2008 11:59 PM
  • (I think the concept behind the post is that of appreciating where ED uses white background as white and where white represents transparent. Besides JPG will also render out transparent as white.)

    Try:

    1 - imported bitmap on one layer

    2 - grab any of the pens or shape tools and draw shapes over the sections intended to be transparent.

    3 - fill the shapes with a solid colour then switch to Erase blend mode

    4 - export the image to PNG format

    Complexifying
    a - gradients of the same colour but with different opacity settings allow for background fades

    b - live effects will/should also give some subtle effects under Erase blend mode

    c - pattern fills with Erase blend mode can give some great results

    Thursday, March 27, 2008 9:29 AM
  • I am trying to do something of the same sort. It would be really nice if the pen tool had a lasso effect like the Photoshop "magic wand" so that i could at least simulate cutting a certain area, or piece, of an image by making the shape, using this tool, and selecting "Eraser" as the blend mode.

    Could you submit that as a request, Will?
    Saturday, December 20, 2008 7:31 AM