Added ImageMagick engine and optional generator argument to constructor.