From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16278.45454.297592.632833 at akasha.ijm.jussieu.fr> Date: Wed, 22 Oct 2003 18:34:22 +0200 To: lablgtk at kaba.or.jp Subject: Re: Crashing bug in lablgtk2 2.2.0 when reading image from pixmap (Windows only) In-Reply-To: <16278.44802.299222.468101 at akasha.ijm.jussieu.fr> References: <20031021123817.GA5277 at redhat.com> <20031021124207.GB5277@redhat.com> <20031021124824.GC5277@redhat.com> <16277.22158.816434.308669@akasha.ijm.jussieu.fr> <20031021161441.GD5277@redhat.com> <16278.44802.299222.468101@akasha.ijm.jussieu.fr> > let get_length (_, pixbuf) = > - get_rowstride pixbuf * (get_height pixbuf - 1) + get_width pixbuf + pos > + get_rowstride pixbuf * (get_height pixbuf - 1) + (get_width pixbuf * get_n_channels pixbuf) + pos > actually it should even be : get_rowstride pixbuf * (get_height pixbuf - 1) + (get_width pixbuf * get_n_channels pixbuf * (get_bits_per_sample pixbuf / 8)) + pos so I guess this simpler one is better : get_rowstride pixbuf * get_height pixbuf + pos -- Olivier