Re: Understanding bmp image files



On Apr 2, 12:51 pm, pranav <pra...@xxxxxxxxx> wrote:
Hello,
I want to read a BMP file, do some processing and then write it in a
new file. The problem is in the third step. For reading the file, i
have converted the file into decimal numbers, representing the pixel
values. Then i perform calculations on those decimal numbers. Now i am
unable to convert those into the format as required by the "bmp" file.
Any one, who is into image reading/manipulation, please help.

Here is a link to a *very* crude BMP file utility I wrote a long time
ago. (http://www.geocities.com/ptmcg/python/index.html#bmp) Follow
the highlighted "module" link to see the underlying code - there are
methods for saving the BMP data to a file. Perhaps those samples
might give you some insight on what is required.

(I would probably rewrite this to use the struct module nowadays, but
this code works as is.)

-- Paul
.



Relevant Pages

  • Understanding bmp image files
    ... I want to read a BMP file, do some processing and then write it in a ... For reading the file, i ... unable to convert those into the format as required by the "bmp" file. ... Any one, who is into image reading/manipulation, please help. ...
    (comp.lang.python)
  • bitmap printer driver.
    ... after a searching and reading previous post for this i found that ... IOemUni::ImageProcessingis idle place to get bmp file. ... CreateFile/WriteFile/CloseHandle() api's but when i tried to build this ... *,struct tagBITMAPINFOHEADER *,unsigned char *,unsigned long,struct ...
    (microsoft.public.development.device.drivers)

Loading