Ticket #1280 (closed defect: duplicate)

Opened 20 months ago

Last modified 20 months ago

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

Changed 20 months ago by dmwit

  • status changed from new to closed
  • resolution set to duplicate

duplicate of issue #1281 (sorry about the attachment thing, I'll look into it)

Note: See TracTickets for help on using tickets.