Oops - I should have checked before replying. 

size = abs(bitmap->pitch) * bitmap->rows;



> -----Original Message-----
> From: Werner LEMBERG [mailto:[email protected]]
> Sent: 25 February 2010 17:08
> To: David Bevan
> Cc: [email protected]; [email protected]
> 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
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to