Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

BUGFIX: EXC_BAD_ACCESS during CGContextDrawImage#46

Open
alexappsnet wants to merge 1 commit intoChintan-Dave:masterfrom
alexappsnet:master
Open

BUGFIX: EXC_BAD_ACCESS during CGContextDrawImage#46
alexappsnet wants to merge 1 commit intoChintan-Dave:masterfrom
alexappsnet:master

Conversation

@alexappsnet
Copy link

Why it happened? In my case the image was 500 pixels width but:

NSUInteger width = 500
NSUInteger bytesPerPixel = 4
NSUInteger bytesPerRow = 2016

Because the image took 2016 bytes per row instead of 2000 we need
to allocate more memory for the "imageData" array.

Why it happened? In my case the image was 500 pixels width but:

  NSUInteger width = 500
  NSUInteger bytesPerPixel = 4
  NSUInteger bytesPerRow = 2016

Because the image took 2016 bytes per row instead of 2000 we need
to allocate more memory for the "imageData" array.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant