Fix for Unity Demo as Web Cam Texture is 16x16 and The Demo Does Not Work
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 50/100
Research direction
The bug is in the Unity sample's Update method, where the WebCamTexture width and height are read into W and H before the camera has reported its real resolution. Start there and confirm the texture is 16x16 at startup. The proposed guard returns early until the width exceeds 16, but check that it cannot stall if the camera never starts. Done means the demo decodes the live image instead of a 16x16 patch.
Written by the indexing model from the issue text.
Description
The problem is that the web cam texture starts up with a resolution of 16x16 and the example code does not wait until the resolution is actually set. So the reader is looking at a tiny 16x16 portion of the data and will never "see" the image appropriately.
A quick fix to modify the demo:
void Update()
{
if (camTexture.width <= 16) return;
W = camTexture.width;
H = camTexture.height;
// ... and then the rest
- Dominant language
- C#
- Stars
- 3.1k
- Forks
- 704
- Avg merge
- 13d 17h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micjahn/ZXing.Net
-
crop() overrides document "0 <= top <= Height"; should be top < Height like left < WidthPossibly taken @hidingmyname claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 Half a day Newbie friendliness 22/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 12/100
All issues in micjahn/ZXing.Net
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 89/100
getsentry/sentry-dotnet#5833 · 1 comment ·
Maintainers usually reply within 1 day
-
area: core priority: low type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
RicoSuter/Namotion.Interceptor#863 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitfoundation/bitplatform#14428 · 1 comment ·
Maintainers usually reply within 1 day
-
area-cli
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day