You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The length of the bitmap buffer is calculated using self.width() * self.rows(), this however assumes that one pixel equals one byte, which might not be the case (for example if pixel_mode == Mono. The correct way to calculate the buffer length would be self.pitch().abs() * self.rows(), if I understand the freetype documentation correctly.
Also, if I interpret the documentation correctly, when pitch is negative, the buffer pointer points at the last row in memory (i.e. buffer points at the row with index zero, but the row at index one is located at a lower address than that row in memory).
The text was updated successfully, but these errors were encountered:
Hm, no, start of the buffer seems to be always the same. The bitmap is just stored upside-down in case of negative pitch, but last address is still at bitmap.buffer + len. @m4rw3r, correct?
The length of the bitmap buffer is calculated using
self.width() * self.rows()
, this however assumes that one pixel equals one byte, which might not be the case (for example ifpixel_mode == Mono
. The correct way to calculate the buffer length would beself.pitch().abs() * self.rows()
, if I understand the freetype documentation correctly.Also, if I interpret the documentation correctly, when
pitch
is negative, thebuffer
pointer points at the last row in memory (i.e.buffer
points at the row with index zero, but the row at index one is located at a lower address than that row in memory).The text was updated successfully, but these errors were encountered: