copied Imagemagick code from:  http://www.imagemagick.org/script/magick-wand.php
copied Imagemagick code from:
 http://www.imagemagick.org/script/magick-wand.php

greg-minshall/image2k,greg-minshall/image2k