Can't decode jpg buffer back to image

ok so what range do your values have, what’s min and max of the array you pass to imencode?