Re: Understanding bmp image files
- From: Paul McGuire <ptmcg@xxxxxxxxxxxxx>
- Date: Wed, 2 Apr 2008 11:05:49 -0700 (PDT)
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
.
- References:
- Understanding bmp image files
- From: pranav
- Understanding bmp image files
- Prev by Date: Re: class / module introspection?
- Next by Date: Re: Manipulate Large Binary Files
- Previous by thread: Re: Understanding bmp image files
- Next by thread: Re: Understanding bmp image files
- Index(es):
Relevant Pages
|
Loading