2006 IR Open Dicussion Posted August 26, 2006 Share Posted August 26, 2006 By: Christiaan - christiaan_se Transparent gif has black background 2006-02-17 07:38 Hi, I have a transparent gif image. I use a parameter to load the image as a buffered image. The background appears black. When loading the image using IReport (so a path is used) the image background is transparent. Any thoughts? kind regards, Christiaan <image scaleImage="FillFrame" vAlign="Top" hAlign="Left" isUsingCache="false" evaluationTime="Page" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="6" y="2" width="77" height="16" forecolor="#000000" backcolor="#FFFFFF" key="image-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch" pen="None" fill="Solid" /> <imageExpression class="java.awt.Image"><![CDATA[$P{image}]]></imageExpression> </image> Link to comment Share on other sites More sharing options...
maxpog23 Posted April 30, 2009 Share Posted April 30, 2009 Hello,I have the same problem, maybe you resolved it since ... Link to comment Share on other sites More sharing options...
chr15athome Posted May 1, 2009 Share Posted May 1, 2009 What you veiwing the report with? Link to comment Share on other sites More sharing options...
C-Box Posted May 4, 2009 Share Posted May 4, 2009 Don't use java.awt.Image for transparent GIFs.... just load it as InputStream and you'll get transparent GIF's working! hthC-Box Link to comment Share on other sites More sharing options...
maxpog23 Posted May 4, 2009 Share Posted May 4, 2009 Hello,I create the stream using ImageIO class, I pass it to my report as a parameter and then in my report I use java.io.InputStream to renderer the picture.I get nothing. What do I do wrong? Code:ImageIO.createImageInputStream(image) Link to comment Share on other sites More sharing options...
maxpog23 Posted May 4, 2009 Share Posted May 4, 2009 Ok I finally manage to use an inputStream to have a transparent background.thanks C-Box Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now