Oops - I should have checked before replying. size = abs(bitmap->pitch) * bitmap->rows;
> -----Original Message----- > From: Werner LEMBERG [mailto:w...@gnu.org] > Sent: 25 February 2010 17:08 > To: David Bevan > Cc: samaram...@gmail.com; freetype@nongnu.org > Subject: Re: [ft] bitmap buffer length > > > > size = ((bitmap->width + 7) / 8) * bitmap->rows; > > > > // ((bitmap->width + 7) / 8) is the number of bytes for bitmap->width > bits > > This is not necessarily correct. Especially on Windows, the pitch > might be a multiple of 4. I suggest to always use the `pitch' field. > > > Werner _______________________________________________ Freetype mailing list Freetype@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype