Hi Jürgen,

>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()

Great! That works! :-) Many thanks to you and to Stefan!

Bernhard

--
Bernhard Seckinger <bernhard.seckin...@bueffee.de>
_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to