Archi Forum

Archi => General Archi Discussion => Topic started by: pds on May 10, 2017, 13:24:07 PM

Title: Image quality in reports
Post by: pds on May 10, 2017, 13:24:07 PM
Any way to change the image format and/or  DPI in the HTML and Jasper reports?
Title: Re: Image quality in reports
Post by: Phil Beauvoir on May 10, 2017, 13:27:48 PM
No, sorry. Not unless someone contributes this as a feature.
Title: Re: Image quality in reports
Post by: pds on May 14, 2017, 18:50:54 PM
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?.
Title: Re: Image quality in reports
Post by: Phil Beauvoir on May 14, 2017, 19:02:59 PM
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.
Title: Re: Image quality in reports
Post by: pds on May 14, 2017, 19:30:24 PM
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.


Title: Re: Image quality in reports
Post by: Phil Beauvoir on May 14, 2017, 19:31:56 PM
Great!

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

Phil
Title: Re: Image quality in reports
Post by: pds on May 14, 2017, 19:47:07 PM
Okay, until eclipse grow up and use vectors instead of bitmap I'll scale up to 4x.
Title: Re: Image quality in reports
Post by: Phil Beauvoir on May 14, 2017, 20:08:18 PM
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.
Title: Re: Image quality in reports
Post by: Phil Beauvoir on May 15, 2017, 09:30:22 AM
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.
Title: Re: Image quality in reports
Post by: pds on May 17, 2017, 18:02:12 PM
Some non-fuzzy icons. All archimate ones done plus the most annoying system ones.
Title: Re: Image quality in reports
Post by: Phil Beauvoir on May 17, 2017, 18:16:23 PM
Thank-you.

Does it work out of the box by naming them with the "@2x" prefix?
Title: Re: Image quality in reports
Post by: pds on May 17, 2017, 18:17:24 PM
Yes. And according to the SWT documentation it should if you use the right API, which Archi does.
Title: Re: Image quality in reports
Post by: pds on May 19, 2017, 09:02:10 AM
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.
Title: Re: Image quality in reports
Post by: Phil Beauvoir on May 19, 2017, 09:34:28 AM
I can't remember what that line is supposed to be doing.