Hi,
I have been working with exact BYTE values on bitmaps and never realized of such a thing. Always got the values I was especting out. I use GIMP, so let me ask some questions.

Do you save the bitmap as TGA? Other formats might change the values, as palettized ones, such PCX, or compressed, such PNG.

Do Photoshop apply any color correction on importing proccess? Proffesional bitmap editing programs do commonly apply a color correction. Is there any option while importing?

Here goes the results of a new test of mine:
Code
#include <acknex.h>

void main () {
	wait(3);
	
	BMAP *_bmpT = bmap_createblack(16, 16, 32);
	bmap_fill(_bmpT, vector(128, 128, 128), 50);
	bmap_save(_bmpT, "b01.tga");
	wait(1);
	
	var _frm = bmap_lock(_bmpT, 0);
	var _pixel = pixel_for_vec(vector(128, 128, 128), 50, _frm);
	pixel_to_bmap(_bmpT, 0, 0, _pixel);
	bmap_unlock(_bmpT);
	bmap_save(_bmpT, "b02.tga");
	wait(1);
	
	var _frm = bmap_lock(_bmpT, 0);
	BYTE *_bits = _bmpT->finalbits;
	*(_bits + 3) = 127;
	bmap_unlock(_bmpT);
	bmap_save(_bmpT, "b03.tga");
	wait(1);
	
	bmap_remove(_bmpT);
	
	sys_exit(NULL);
}


The three bitmaps have the same exact values at pixel x0:y0

[Linked Image]