I am trying to add a slate frame(company logo, artist data etc) just before the mplay preview.I am testing the pil module, comes with houdini itself.
For testing i was running below code from self tool.
from PIL import Image, ImageDraw, ImageFont image = Image.open('C:\Users\sunlight\Desktop\Houdini3D_icon.png') width, height = image.size draw = ImageDraw.Draw(image) text = "A watermark" font = ImageFont.truetype('C:\Users\sunlight\Desktop\arial.ttf', 12) textwidth, textheight = draw.textsize(text, font) # calculate the x,y coordinates of the text margin = 5 x = width - textwidth - margin y = height - textheight - margin # draw watermark in the bottom right corner draw.text((x, y), text, font=font) image.save('cats.png')
but it is giving me error
Traceback (most recent call last): File "tool_1", line 9, in <module> File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.736\python27\lib\site-packages\PIL\ImageFont.py", line 260, in truetype return FreeTypeFont(font, size, index, encoding) File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.736\python27\lib\site-packages\PIL\ImageFont.py", line 140, in __init__ self.font = core.getfont(font, size, index, encoding) File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.736\python27\lib\site-packages\PIL\ImageFont.py", line 42, in __getattr__ raise ImportError("The _imagingft C module is not installed") ImportError: The _imagingft C module is not installed
If I run this code from my window python , its working.
Thanking you guys in advance, need help !!!!