I am trying to put the north arrow on the graphic output of the map using PyQGIS (QGIS 3.4). I tried adding it as an image with the attached code but I have the background of the image and it does not fit. Would there be any other way?
north = QgsLayoutItemPicture(layout)
north.setPicturePath("C:/Users/Pc/Desktop/logo.png")
layout.addLayoutItem(north)
north.attemptResize(QgsLayoutSize(23, 23,gsUnitTypes.LayoutMillimeters))
north.attemptMove(QgsLayoutPoint(3,234,QgsUnitTypes.LayoutMillimeters))