Copied to clipboard

Flag this post as spam?

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


  • Praveen 13 posts 33 karma points
    Apr 17, 2012 @ 12:27
    Praveen
    0

    White background on Image Thumbnail

    When i thumbnail a transparent background image it gets displayed as a image with white background. I want the thumbnailed image also to be transparent. How can i achieve this through my code? 'productImage' is the actual image which is thumbnailed.

    <xsl:attribute name="src">

    <

     

     

    xsl:text>/ImageGen.ashx?image=</xsl:text>

    <

     

     

    xsl:value-of select="umbraco.library:ReplaceLineBreaks(productImage)"/>

    <

     

     

    xsl:text>&amp;width=90</xsl:text><xsl:text>&amp;compression=95</xsl:text><xsl:text>&amp;Transparent=true</xsl:text>

     

    </

     

     

    xsl:attribute>

     

  • Peter Nielsen 149 posts 206 karma points
    Apr 17, 2012 @ 13:13
    Peter Nielsen
    0

    Are you using png's or gifs? :-)

  • Praveen 13 posts 33 karma points
    Apr 17, 2012 @ 13:58
    Praveen
    0

    Hi Peter,

    i am using gifs ..

  • Peter Nielsen 149 posts 206 karma points
    Apr 17, 2012 @ 14:59
    Peter Nielsen
    0

    Okay.. Well I can see in that both are supported. Try and remove the Compression parameter. compression is  for jpegs only, so maybe that could be the cause :-)

  • Praveen 13 posts 33 karma points
    Apr 17, 2012 @ 16:42
    Praveen
    0

    Even after removing the compression parameter it appears with white background.. i added an attribute BgColor=black and it appears transparent after that but with dirty black border.. the original image is around 130kb and the thumb version comes around 4 kb.. is there something i can do using imaggen ??

    with white background:

    after using bgcoor=black:

     

Please Sign in or register to post replies

Write your reply to:

Draft