Image magick object refactor