Ticket #1280 (closed defect: duplicate)
Cairo computes bounds wrong in imageSurfaceGetPixels
| Reported by: | guest | Owned by: | paolo |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.13.0 |
| Component: | Cairo bindings | Version: | 0.12.4 |
| Keywords: | Cc: |
Description
r in imageSurfaceGetPixels is the stride of the surface, which is defined as being the number of bytes of one row. Therefore, bytes can just be computed by r * height. Also, if I understand correctly, the + 7 should have been outside the row computation to force rounding upwards.
Further more, the bounds in mkSurfaceData seem to be off by one.
Please see attached patch.
Change History
Note: See
TracTickets for help on using
tickets.