Пример #1
0
 def _WriteText(self, disp, img, txt, color):
     if (disp is not None):
         txt = ' ' + txt + ' '
         img = img.adaptiveScale(disp.resolution)
         layer = DrawingLayer((img.width, img.height))
         layer.setFontSize(60)
         layer.ezViewText(txt, (20, 20), fgcolor=color)
         img.addDrawingLayer(layer)
         img.applyLayers()
         img.save(disp)
Пример #2
0
 def _WriteText(self, disp, img, txt,color):
     if(disp is not None):
         txt = ' ' + txt + ' '
         img = img.adaptiveScale(disp.resolution)
         layer = DrawingLayer((img.width,img.height))
         layer.setFontSize(60)
         layer.ezViewText(txt,(20,20),fgcolor=color)
         img.addDrawingLayer(layer)
         img.applyLayers()
         img.save(disp)