[Qgis-user] Problems with custom SVG images when transfering a project to another computer
Jürgen E. Fischer
jef at norbit.de
Tue Feb 25 01:31:15 PST 2025
Hi Bernhard,
On Tue, 25. Feb 2025 at 10:04:54 +0100, Bernhard Seckinger via QGIS-User wrote:
> I wonder if conversion to base64 is enough to embed the symbol in the project
> file? My feeling says it isn't. Does anyone has some experience here?
symlayer = layer.renderer().rootRule().children()[0].symbol().symbolLayer(0)
f = QFile(symlayer.path())
f.open(QIODevice.ReadOnly):
symlayer.setPath("base64:" + f.readAll().toBase64().data().decode("utf-8"))
f.close()
Jürgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden https://www.norbit.de
QGIS release manager (PSC) Germany IRC: jef on Libera|OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250225/eaea2236/attachment.sig>
More information about the QGIS-User
mailing list