I have written a raw binary image file into a buffer which is an Int16[] and I need to edit the specific data points by multiplying them by a specific scalar. Is there any efficient way to access the information and be able to manipulate the data there?
Though it isn’t much I have a shell written that then writes the buffer back out into a binary file after the editing has been done and then saves it:
public void correctColor()
{
//TODO: Write a loop to read each value in the buffer
// and multiply by the appropriate scalar.
writeBinaryFile(this.outFile, this.pixelBuffer);
}
Any tips or suggested resources would be great.
It’s not obvious to me what the nature of the transformation you’re trying to do is or what the problem with doing it might be.
On the surface of it, if what you have is really pixels of color (as opposed to palette indexes), something like this should work: