Skip to content

Fixed graphics context allocation issue#1007

Open
aman32767 wants to merge 1 commit into
DylanVann:mainfrom
aman32767:fix-graphics-context-issue
Open

Fixed graphics context allocation issue#1007
aman32767 wants to merge 1 commit into
DylanVann:mainfrom
aman32767:fix-graphics-context-issue

Conversation

@aman32767

@aman32767 aman32767 commented Sep 25, 2023

Copy link
Copy Markdown

Title: Resolved Graphics Context Allocation Issue

Description:

Proposed Changes
This PR resolves an issue pertaining to graphics context allocation in the FFFastImageViewManager. The previous implementation utilized older graphics context handling methods, which could potentially lead to errors. This PR updates the code to leverage the newer UIGraphicsImageRenderer API, mitigating any context allocation problems.

Changes Made

  • Updated FFFastImageViewManager.m to utilize UIGraphicsImageRenderer for managing image context.
  • Eliminated manual handling of context creation and cleanup, reducing the likelihood of errors.

Graphics Context Handling:
It now employs UIGraphicsImageRenderer, a more modern API introduced in iOS 10. This API handles the creation, rendering, and cleanup of the image context automatically.

Renderer Usage:
It now creates a UIGraphicsImageRenderer object (renderer) and employs it to execute the drawing operations.

Error Handling:
It leverages a more modern API that is less susceptible to context allocation errors.

This PR addresses: #1006

This was referenced Sep 25, 2023
@AdamGerthel

AdamGerthel commented Sep 25, 2023

Copy link
Copy Markdown

Works well for me on iOS 17

@MuhammadMuzammilQadri

Copy link
Copy Markdown

Working fine on iOS 17. Thanks

@johanholm

Copy link
Copy Markdown

@DylanVann Please merge

@fukemy

fukemy commented Oct 7, 2023

Copy link
Copy Markdown

someone please tell me how to install this pull by npm

@AdamGerthel

Copy link
Copy Markdown

someone please tell me how to install this pull by npm

You can apply a patch, see #1002 (comment)

@mohitarora777

Copy link
Copy Markdown

@AdamGerthel I already have a patch applied for fast image in podsec file. Can u tell how can we apply multiple patches to same lib ?

@AdamGerthel

AdamGerthel commented Oct 10, 2023

Copy link
Copy Markdown

@AdamGerthel I already have a patch applied for fast image in podsec file. Can u tell how can we apply multiple patches to same lib ?

I don't understand exactly what you mean by "I already have a patch applied for fast image in podsec file" - could you be a bit more specific? If you want to understand how to apply a patch for an npm package, the best way is to read the usage instructions for patch-package.

@mohitarora777

mohitarora777 commented Oct 10, 2023

Copy link
Copy Markdown

Got it thanx @AdamGerthel

@Strate

Strate commented Nov 9, 2023

Copy link
Copy Markdown

Thank you for this!

@hadnet

hadnet commented Jan 14, 2024

Copy link
Copy Markdown

@DylanVann please, man, merge this.

@Nazim-hasan

Copy link
Copy Markdown

@DylanVann please, merge this.

@youssefalaaramadan

Copy link
Copy Markdown

having the same issue in flutter, how can we solve that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.