Better way for decoding image

Open
#508 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
objective-c

Research direction

Start at the pin_decodedImageWithData method and compare its current bitmap-drawing approach with the linked Twitter Image Pipeline implementations. Check how the proposed 1x1 context behaves for portrait and other image orientations, then verify that decoding preserves orientation while avoiding a temporary bitmap sized like the image.

Written by the indexing model from the issue text.

Description

enhancement

I'm looking into pin_decodedImageWithData method and wandering can't we find better way for decoding ? With current implementation in order to decode an image we are creating additional bitmap with the same size and draw on it. We could draw into 1x1 context like done here , concrete implementations are here. If there may be issues with image orientation(in which I'm not sure) we can do this way only when image is in portrait mode. By doing this way we can save temporary memory of image size.

Dominant language
Objective-C
Stars
4k
Forks
516
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pinterest/PINRemoteImage

All issues in pinterest/PINRemoteImage

Similar issues

More Objective-C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.