Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG and raster images can be embedded in project #4563

Merged
merged 2 commits into from
Dec 7, 2019

Conversation

DelazJ
Copy link
Collaborator

@DelazJ DelazJ commented Dec 5, 2019

Fix #3219, fix #3216, fix #2815, fix #2814

@DelazJ
Copy link
Collaborator Author

DelazJ commented Dec 5, 2019

@andreasneumann @rduivenvoorde you were among the happiest people 😄 when the feature was committed. Can you check whether there's some valuable information missing or that i'd have misunderstood, please?
@nyalldawson the commit of #2814 mentions that svg can be saved in qpt files but i can't find a feature in layout that has this new widget for file selection. What did I miss?

QGIS needs to resolve the path in order to display the corresponding image
* load the file from a remote URL: as above, on the success of the connection
depends the image retrieval
* embed the SVG file into the item: the file is saved as a base64 string within
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the file is saved as a base64 string within"

Is this relevant for users? It's not exposed anywhere, and could potentially be changed in future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just "the file is embedded inside the current project, style database, or print layout template."

* embed the SVG file into the item: the file is saved as a base64 string within
the symbol or label, and also in the project, an associated style or a print
layout template file. THe SVG file is then always rendered as part of the item.
A convenient way to share projects with custom SVG symbols.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  This is a convenient way to create self-contained projects with custom SVG symbols which can be easily shared amongst different users and installations of QGIS.

@DelazJ
Copy link
Collaborator Author

DelazJ commented Dec 5, 2019

@nyalldawson Thanks for the quick review. Any element regarding the print layout case?

@nyalldawson
Copy link
Contributor

It's not currently supported in print layouts

Copy link
Contributor

@havatv havatv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to help by updating some comments and adding some of @nyalldawson's comments as suggestions.

Co-Authored-By: Håvard Tveite <havard.tveite@nmbu.no>
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
@DelazJ DelazJ merged commit 1d0761f into qgis:master Dec 7, 2019
@DelazJ DelazJ deleted the embeddedSVG branch December 7, 2019 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants