문제

While i am using ImageMagick "-font" option to annotate images with text, such as:

convert my-file -font my-font.ttf ...

Will my-font.ttf be opened every time when i issue that command?

ps, i am using paperclip/rails to annotate images with text, "convert" command is called in paperclip processor. i am not sure "-font" way is efficiently enough or not? or will that kill a lot of memories? (my-font.ttf is more than 20M),

thanks in advance!

도움이 되었습니까?

해결책

Fonts are not cached in ImageMagick. It will be read from disk every time text is drawn on an image. Maybe you should try to reduce the size of your ttf file to improve your performance. A ttf file that needs 20M sounds a bit excessive. Take a look at the following question to reduce the size of your file: Way to reduce size of .ttf fonts?.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top