Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44514

Re: Can read in the BMP data correctly ,but the size is not right?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.062
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'subject:not': 0.03; 'image,': 0.09; 'pixels': 0.09; 'confuse': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'array': 0.29; "i'm": 0.30; 'code': 0.31; 'subject:size': 0.31; 'file': 0.32; 'actual': 0.34; 'subject:the': 0.34; 'but': 0.35; 'subject:data': 0.36; 'subject:?': 0.36; 'should': 0.36; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'read': 0.60; 'subject:Can': 0.60; 'simply': 0.61; "you're": 0.61; 'information': 0.63; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'reply-to:addr:python.org': 0.84; 'subject:read': 0.84; 'picture': 0.97
X-CM-Score 0.00
X-CNFS-Analysis v=2.1 cv=TZ6v63gh c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=7AxPfEIvyrUA:10 a=w4NqssXzfjwA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=QD0EwwhTGyMA:10 a=iEf-PkUZjnehE2kmh2MA:9 a=wPNLvfGTeEIA:10
X-AUTH mrabarnett:2500
Date Mon, 29 Apr 2013 19:10:59 +0100
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version 1.0
To python-list@python.org
Subject Re: Can read in the BMP data correctly ,but the size is not right?
References <aee818ca-e077-4e52-be55-7b8282684ba4@googlegroups.com>
In-Reply-To <aee818ca-e077-4e52-be55-7b8282684ba4@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1160.1367259060.3114.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1367259060 news.xs4all.nl 15956 [2001:888:2000:d::a6]:50964
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:44514

Show key headers only | View raw


On 29/04/2013 18:20, Jimmie He wrote:
> I'm trying to read in the BMP data by the the code below,and I'm
> check the data array with WINHEX,and it is correct,but which confuse
> me is why the size is 0x180,but the actual picture should be 48*48 =
> 0x120 bytes because I use 1-bit BMP not the 24bit BMP,could any one
> give some hints?
>
[snip]
What size is 0x180?

If you're asking why the file size is 0x180 and not 0x120, it's simply
because of the header. An image file contains not just the pixels of
the image, but also information about the image.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Can read in the BMP data correctly ,but the size is not right? Jimmie He <jimmie.he@gmail.com> - 2013-04-29 10:20 -0700
  Re: Can read in the BMP data correctly ,but the size is not right? Chris Angelico <rosuav@gmail.com> - 2013-04-30 03:53 +1000
  Re: Can read in the BMP data correctly ,but the size is not right? Peter Otten <__peter__@web.de> - 2013-04-29 19:57 +0200
    Re: Can read in the BMP data correctly ,but the size is not right? Jimmie He <jimmie.he@gmail.com> - 2013-04-30 06:09 -0700
    Re: Can read in the BMP data correctly ,but the size is not right? Jimmie He <jimmie.he@gmail.com> - 2013-05-04 03:26 -0700
  Re: Can read in the BMP data correctly ,but the size is not right? MRAB <python@mrabarnett.plus.com> - 2013-04-29 19:10 +0100
  Re: Can read in the BMP data correctly ,but the size is not right? 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-29 11:12 -0700

csiph-web