Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 07, 2012 @ 14:56
    Jan Skovgaard
    0

    Transparent=true not working?

    Hi

    I'm currently using ImageGen on a project where I need to ensure that png images are kept transparent. But for some reason I can't seem to get it working.

    For instance I have this image: <img src="/umbraco/ImageGen.ashx?image=/tilbud/20x41_1521_sp-gradient.png&amp;width=215&amp;height=112&amp;pad=true&amp;transparent=true" />

    This gives me a black baggrund color?

    Using version 2.5.2 on Umbraco 4.7.1.

    Cheers,

    Jan

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Jun 19, 2012 @ 10:14
    Chriztian Steinmeier
    0

    I'm seeing this too - would like to know if anyone knows why ...

    Is this a limitation (e.g., not able to output PNG)?

    I know that PNG images interpreted (by the browser) as JPEG will show up with a black background, which could be part of the explanation ...

    /Chriztian

  • Ernst Utvik 123 posts 235 karma points
    Jun 19, 2012 @ 19:48
    Ernst Utvik
    0

    Try using constrain=true instead of pad=true. Won't "center" the image like you get with pad but should remain transparent.

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Jun 19, 2012 @ 23:11
    Chriztian Steinmeier
    0

    Thanks Ernst - that's kind of a workaround for now, just need to do some manual centering, I guess...

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft