Jump to content
We've recently updated our Privacy Statement, available here ×

Transparent gif has black background


Recommended Posts

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

  • 2 years later...
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...