Out-of-palette pixels render as black ink

Open Beginner friendly
#87 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift

Research direction

Start with SubtitleImageSource.imageDataToRGBA and createImage, both named in the issue. Trace how an out-of-palette index becomes RGBA data and how that data is treated when creating the OCR image. Change the fallback to transparent and confirm those pixels no longer add black noise.

Written by the indexing model from the issue text.

Description

bug

SubtitleImageSource.imageDataToRGBA maps an index outside the palette to opaque white [255, 255, 255, 255]. createImage then treats it as visible and (by default) inverts it to black, adding black noise to the OCR image.

Fix: map out-of-palette indices to transparent.

Dominant language
Swift
Stars
42
Forks
9
Avg merge
9h 30m
Merged PRs (30d)
4

Getting set up

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 ecdye/macSubtitleOCR

All issues in ecdye/macSubtitleOCR

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.