Minor code improvements in imagick getString function