Update Image.php

Changed a little error that caused the first loop to loop forever.
Merge pull request #16 from leolabs/patch-1

fix case where we have less colors than requested