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
signature.asc
Description: PGP signature
_______________________________________________ QGIS-User mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
