FT2Image#
... is deprecated. Use 2D uint8 ndarrays instead. In particular:
The
FT2Imageconstructor tookwidth, heightas separate parameters but the ndarray constructor takes(height, width)as single tuple parameter.FT2Font.draw_glyph_to_bitmapnow (also) takes 2D uint8 arrays as input.FT2Image.draw_rect_filledshould be replaced by directly setting pixel values to black.The
imageattribute of the object returned byMathTextParser("agg").parseis now a 2D uint8 array.