Image quality in reports

Started by pds, May 10, 2017, 13:24:07 PM

Previous topic - Next topic

pds

Any way to change the image format and/or  DPI in the HTML and Jasper reports?

Phil Beauvoir

No, sorry. Not unless someone contributes this as a feature.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

pds

I've noticed that this is fine on OSX? any ideas?

Also the icons on OSX are jagged. Any plans to introduce 2x, 3x etc?.

Phil Beauvoir

#3
Regarding producing 2x icons:

- I am not a graphic artist able to produce high-res images from low-res 16x16 images
- I do not own a high-def laptop or monitor so I cannot test these
- I can't do everything Well, I can try to help... ;-)

As Archi is open source, this is an ideal case where someone might contribute this.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

pds

Okay fair enough. I'll do them.

I've redone about half of the icons from a pull from git (32x32, 64x64 mostly hand drawn and they look great) but I have no git write access (and someone need to check quality anyway I guess) and I'll need to see how it looks on my 4K PC monitor (laptops & PCs) and Mac's (5K + retina laptops). Yeah I have a lot of high-end kit.

I've had to change some source code to use PNGs instead of gif files for open file icons etc. (WTF? but working thru that) and that will also scale.

In terms of reports, I'll do that after this and see if I can't do SVG for the images instead of png.



Phil Beauvoir

Great!

You don't need GitHub write access, you can submit a pull request.

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

pds

Okay, until eclipse grow up and use vectors instead of bitmap I'll scale up to 4x.

Phil Beauvoir

But read up on the Eclipse requirements - I think it needs to be 1x and 2x. Do a proof of concept and see if it works with one or two icons before proceeding.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

See:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c127

QuoteYou need to create pixel-doubled versions of your images and place them alongside your normal images with a `@2x` prefixed to the extension.

So if you have a 16x16 image in `icons/ov_hdr.png` then you should create a 32x32 image in `icons/ov_hdr@2x.png`.

There is no support for SVG images, though you can use them as the source for a SVG -> PNG conversion.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

pds

Some non-fuzzy icons. All archimate ones done plus the most annoying system ones.

Phil Beauvoir

Thank-you.

Does it work out of the box by naming them with the "@2x" prefix?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

pds

Yes. And according to the SWT documentation it should if you use the right API, which Archi does.

pds

The image quality issue in HTML (and maybe jasper) reports is caused by this line:

rectangle.expand(margin / scale, margin / scale);

@ line 160 in com.archimatetool.editor.diagram.util.DiagramUtils

comment it out and is's a LOT better. However, some items of low contrast are still not showing up correctly.

No effect on mac, which still produced images of far better quality.

Phil Beauvoir

I can't remember what that line is supposed to be doing.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.