ImageLib4WP image library for windows phone copied from .net image tools, fixed the array out of index bug.