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

Scaling image to given width, retain shape, dynamically adjust height


michael.hafner

Recommended Posts

Hi all,

I am looking for a solution (in plain jasper reports without the possibility to program something in java as the app is a given commercial product of an external company) to have an image scale to the given width of the image field on the report but to keep the shape (relation  between x and y) intact and just dynamically stretch the height if neccessary (if it is too small to fit the scaled image in).

This is with JR 5.6.0.

I mean - something like scale image type "Retain shape" in combination with "Fill width and stretch height if neccessary" (the latter does not exist).

Optically, the same can be achieved by just making the height of an image oversized - and then diverse different picture heights are possible and all stretch to the max width. But the goal should be to only use as much height for the image field as neccessary and push (float) fields below the image to the exact height of the current picture.

Any chance to achieve that?

With kind regards,

Michael

 

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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