Community
Participate
Working Groups
It should be possible to get a better resolution when exporting image from Sirius.
Could you detail? Which format did you use? Indeed, an improvement has already be done with bug 436579 for jpg format. * example before bug 436579 : https://bugs.eclipse.org/bugs/attachment.cgi?id=243970 * example after bug 436579 : https://bugs.eclipse.org/bugs/attachment.cgi?id=243971
New Gerrit change created: https://git.eclipse.org/r/85123
Created attachment 265373 [details] small.jpg An export without the patch (another diagram called "wide" is just not even exported because of the potential for an OOM error)
Created attachment 265375 [details] withpatch-small.jpg With the patch applied on a fairly small (size-wise) diagram.
Created attachment 265376 [details] withpatch-wide.jpg A "wide" diagram which gets correctly exported with the patch
What we can see is that the size of the file is significantly increased as the resolution gets larger (there is no free lunch) though a "classic" diagram will end's up in the 1-2-3MB range whereas it used to be in the 200/300K range. That's an order of magnitude more (even if I would argue it should not be a problem in 2016) but that probably deserves the capability to control that when using the export by code and also a specific entry in the release notes.
With the patch set 3 of the patch [1], there are remaining problems. Steps to reproduce: * Import project Compartiments (from Compartiments.zip) * Open diagram "diag-10-10": {-10, -10} is the origin coordinates of the diagram * Export this diagram as image (with the patch applied): KO, the result is a truncated diagram (see diag-10-10.jpg) * Open diagram "diag-5815-5575": {-5815, -5575} is the origin coordinates of the diagram * Export this diagram as image (with the patch applied): KO, the result is reduced diagram without the correct origin and size (see diag-5815-5575.jpg) [1] https://git.eclipse.org/r/#/c/85123/3
Created attachment 265885 [details] Compartiments.zip for the steps to reproduce
Created attachment 265886 [details] diag-5815-5575.jpg
Created attachment 265887 [details] diag-10-10.jpg
(In reply to Laurent Redor from comment #7) > With the patch set 3 of the patch [1], there are remaining problems. > > Steps to reproduce: > * Import project Compartiments (from Compartiments.zip) > * Open diagram "diag-10-10": {-10, -10} is the origin coordinates of the > diagram > * Export this diagram as image (with the patch applied): KO, the result is a > truncated diagram (see diag-10-10.jpg) > * Open diagram "diag-5815-5575": {-5815, -5575} is the origin coordinates of > the diagram > * Export this diagram as image (with the patch applied): KO, the result is > reduced diagram without the correct origin and size (see diag-5815-5575.jpg) > > [1] https://git.eclipse.org/r/#/c/85123/3 Thanks for this feeback, indeed the code was scaling X and Y starting positions and that could lead to clipping the wrong area, it was especially visible with negative positions.
Created attachment 266785 [details] diag-10-10.jpg with patch4
Created attachment 266786 [details] diag-5815-5575.jpg with patch4
Gerrit change https://git.eclipse.org/r/85123 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=71b84800013644898560aa649ccd8e0d55afd86c
New Gerrit change created: https://git.eclipse.org/r/91627
Gerrit change https://git.eclipse.org/r/91627 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=069b6e20e89226709b111fbda0046f07dfc1ceca
We have several failures in CI environnement which are suggesting that we might be hitting OS specific limits with this algorithm. Reopening to investigate.
New Gerrit change created: https://git.eclipse.org/r/92613
Gerrit change https://git.eclipse.org/r/92613 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=fd45868c116805919c041bdc2e099cdc9b3fde35
I think we're done now. Cédric, feel free to reopen if I'm missing something.
Validated with Sirius 5.0.0.201705121003
Verified by Jessy.
Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details.