Hi, I want to filter .BMP image with 3x3 digit matrix. Basicly it is multiplying image pixels by numbers in matrix. Any suggestions how it should be done?
I know that i have to open a file using fopen() I did that.
Should I just loop through whole image and multiply it by matrix like (fp * matrix). Or its a correct way to do that. Please give me some suggestions about that.

Thank You in advance.

Regards,

Kycas

Hi, I want to filter .BMP image with 3x3 digit matrix. Basicly it is multiplying image pixels by numbers in matrix. Any suggestions how it should be done?
I know that i have to open a file using fopen() I did that.
Should I just loop through whole image and multiply it by matrix like (fp * matrix). Or its a correct way to do that. Please give me some suggestions about that.

Thank You in advance.

Regards,

Kycas

I'm not sure if you understand the BMP image file format. But there is a fair amount of preliminary work to be done before you can get and modify the color (pixel) data. The link below explains the BMP file format.

Bitmap file format

I have clean image file without any headers only pure data.