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: Thu, 25 Feb 2010 10:36:15 -0500

 

size = ((bitmap->width + 7) / 8) * bitmap->rows;

 

// ((bitmap->width + 7) / 8) is the number of bytes for bitmap->width bits

 

 


From: address@hidden [mailto:address@hidden On Behalf Of samaram s
Sent: 25 February 2010 15:05
To: address@hidden
Subject: [ft] bitmap buffer length

 

Hi,

I would like to know how much is the bitmap buffer size.
Actually i am calculating like below said,

    if((bitmap->width/8) < 1)
        size = 2*bitmap->rows ;
    else
        size = ((bitmap->width /8)+1)*bitmap->rows;


But for few characters i am getting it perfect,but for few characters i am getting more bytes which are not actually required.Is there anyway i can get the correct number of bytes for the bitmap->buffer to read.


Thanks,
Sam


reply via email to

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