Jump to content
Changes to the Jaspersoft community edition download ×

Issues with report images: "No appropriate image writer found"

Go to solution Solved by gustavo.alvarenga,

Recommended Posts

Hello, I'm trying to generate a PDF report on JR 6.19.1 with images on it; those images are loaded as BufferedImage in our application and fed to JasperReports through a JRDataSource. It usually works, but sometimes I get the following error:

net.sf.jasperreports.engine.JRException: No appropriate image writer found for the "jpeg" format.

It seems to happen when we try using .png images in the report. Looking at the source code for JRJdk14ImageEncoder, I can see the following snippet:

switch (imageType){    case JRRenderable.IMAGE_TYPE_GIF :    {        formatName = "gif";        break;    }    case JRRenderable.IMAGE_TYPE_PNG :    {        formatName = "png";        break;    }    case JRRenderable.IMAGE_TYPE_TIFF :    {        formatName = "tiff";        break;    }    case JRRenderable.IMAGE_TYPE_JPEG :    case JRRenderable.IMAGE_TYPE_UNKNOWN :    default:    {        formatName = "jpeg";        break;    }}[/code]

What defines the "imageType" variable there? Is there any way I can tell the report to render all pictures as "png" or something like that?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.

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...