add imagmagic related function