Text OperatorΒΆ

[1]:
import logging
logging.basicConfig(level=logging.INFO)

import graphcat
import imagecat

graph = graphcat.StaticGraph()
imagecat.add_task(graph, "/text", imagecat.operator.render.text)
image = graph.output("/text")
INFO:imagecat.operator.render:Task /text text:
INFO:imagecat.operator.render:  anchor: mm
INFO:imagecat.operator.render:  fontindex: 0
INFO:imagecat.operator.render:  fontname: /Users/tshead/src/imagecat/imagecat/LeagueSpartan-SemiBold.ttf
INFO:imagecat.operator.render:  fontsize: 0.33h
INFO:imagecat.operator.render:  layer: A
INFO:imagecat.operator.render:  position: ('0.5w', '0.5h')
INFO:imagecat.operator.render:  res: [256 256]
INFO:imagecat.operator.render:  string: Text!
INFO:imagecat.operator.render:  output: Image(A: Layer(Role.ALPHA 256x256x1 float16))
[2]:
image.layers["A"]
[2]:
../_images/user-guide_text_2_0.png