--- In [email protected], Jos Timanta Tarigan <jos_t_tari...@...> wrote: > > the problem is i want to merge two image and merging the value of each pixel. > so basically pixel1 + pixel2 / 2.0; > the problem is each of these pixels is char. how can I convert it to float > and then convert it back to char again?
Why do you need to convert to float? How about:
char pixel1, pixel2, newPixel;
newPixel = (pixel1 + pixel2) / 2;
