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: 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 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: In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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.