Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!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.117 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.79; '*S*': 0.02; 'subject:not': 0.03; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'helps.': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'not,': 0.20; 'code,': 0.22; "aren't": 0.24; "haven't": 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'rest': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'fixing': 0.31; 'subject:size': 0.31; 'subject:the': 0.34; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:data': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'subject:Can': 0.60; '30,': 0.65; 'end.': 0.84; 'subject:read': 0.84; 'them)': 0.84; 'careful': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=jCteP3IZ6ElZxoYhKIACfhNacuyFquEQJuDZgGcinSk=; b=PT1dq8HuM6pN1jB9/YNyaBaD8018tnHJvyyuheRvWHiu9npM8+N11ulGhpE6Mk/p9I QCWKsYhkDpdUVikD4xucZyeSg0kjbKc7kzdBlCAvnn6/n96xyPsLCstqrlAjSPcjhPM/ a7heCE9AkdqKbajLvHxptCAoUFl9yzVRMV4xTlHGccJPh5w+l/Z/4el5gwWwp1ucUZE8 wCSl+DVanvheyGz8aLm29ec8ap8bzOxRY1aHJNjCM0RrtXiNPmPpcJdD0OMBq7yXKHm0 VGCaodAC9wnScbTJSWGNmghLlaGYYPC+F1mruCDJ7eAEJxgx8kbXOAFyW/6ahkzvVIQ+ cAkg== MIME-Version: 1.0 X-Received: by 10.52.231.231 with SMTP id tj7mr28697695vdc.111.1367258016051; Mon, 29 Apr 2013 10:53:36 -0700 (PDT) In-Reply-To: References: Date: Tue, 30 Apr 2013 03:53:35 +1000 Subject: Re: Can read in the BMP data correctly ,but the size is not right? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367258024 news.xs4all.nl 15929 [2001:888:2000:d::a6]:41192 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44512 On Tue, Apr 30, 2013 at 3:20 AM, Jimmie He wrote: > handle1.close I haven't looked at the rest of the code, but be careful of this: You aren't actually *calling* this function. That might be your problem and it might not, but try fixing it (add the parentheses, even though there's nothing to put in them) and see if that helps. Same with the handle2.close at the end. ChrisA