freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ft] bitmap buffer length


From: David Bevan
Subject: RE: [ft] bitmap buffer length
Date: Fri, 26 Feb 2010 03:13:11 -0500

Oops - I should have checked before replying. 

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



> -----Original Message-----
> From: Werner LEMBERG [mailto:address@hidden
> Sent: 25 February 2010 17:08
> To: David Bevan
> Cc: address@hidden; address@hidden
> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]