fixed imagejpeg() sencond parameter, should be NULL instead of empty string to skip this argument