ruby on rails - Error "cache resources exhausted" with Imagemagick -
i'm using imagemagick on rails app minimagick , generate pictogram it.
when launch process have error , don"t find solution
minimagick::error (`convert -limit memory 2gib -limit map 2gib -limit disk 4gib -background none -fill #000000 -font ttf/selis006n.ttf -pointsize 300 label: s public/pictogram_images/recintan-el-064-layer-1.png` failed error: convert.im6: cache resources exhausted ` s' @ error/cache.c/openpixelcache/4078. convert.im6: no images defined `public/pictogram_images/recintan-el-064-layer-1.png' @ error/convert.c/convertimagecommand/3044. ):
my process simple, have .tff file , each character pictogram. want generate preview of character in png
not sure item causing problem, 1 of these:
1) need put font imagemagick's xml-based font file rather specify file.ttf
in convert
command. list of available fonts, use
identify -list font | more path: /users/mark/.magick/type.xml <--- edit font here font: acaslonpro family: unknown style: undefined stretch: undefined weight: 0 glyphs: /library/fonts/acaslonpro-regular.otf font: acaslonpro-semibold family: unknown style: undefined stretch: undefined weight: 0 glyphs: /library/fonts/acaslonpro-semibold.otf ... ...
at beginning see path config file fonts , need edit include ttf file mentioned. if have lots of fonts add, may automate process - see other post here.
2) may need escape #
in -fill
option, or @ least surround single, or double quotes hide shell, if minimagick
invokes via shell - don't know ins , outs of minimagick
.
3) may need quote letter s
wish output inside single or double quotes.
4) may need remove space after colon following label
.
what getting @ command should maybe more this:
convert -limit memory 2gib -limit map 2gib -limit disk 4gib -background none -fill "#000000" -font "timesnewroman" -pointsize 300 label:"s" output.png
Comments
Post a Comment