Fixed function missing visibility scope on hex2rgb, and made adjustTransparency parameter optional for PHP 5.5 compatibility