Images are only given a cursory explanation in both template and dev guide, and I'm stuck, so I'm going to post here for help.
I'm using open office.
I am replacing image placeholders with irregularly-shaped images. IE, I don't know the dimensions of the image ahead of time. Sometimes they are tall and skinny, sometimes they are short and fat.
I naturally don't want their aspect ratio screwed up when they are scaled into a square (or whatever) shaped placeholder image.
Is there a fix either on the Java side or the OO side to make the images keep their aspect ratio from their source files/streams and then fit as appropriately as possible (within whatever is the min dimension) of the template?
Please help.
--
Brian
Ok so it wasn't that hard to write a quick'n'dirty bit of Java that scales/translates an odd-shaped image into a fixed-size placeholder (by rewriting the image to a new file with the appropriate dimensions and a white background). Not exactly what I was looking for, but it works.
If there is a more natural way to solve this problem, please let me know.
Hello Brian.
Docmosis currently only supports precise sizing and positioning of images in the template. It will ensure the image is scaled into the size and ratio specified in the template.
Scaling the image to suit the template is currently required by the caller (as you have done). We may consider providing scaling features and placing the image in at its natural size in future if enough users ask for it.
Hello,
I vote for this feature :-)
I also have to insert images with different shapes.
Regards,
Beric
