Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:修正在绘制自定义finderPatternImage时,同时绘制QuietZones会出现位置异常的BUG #474

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

koaqiu
Copy link
Contributor

@koaqiu koaqiu commented Oct 8, 2023

修正在绘制自定义finderPatternImage时,同时绘制QuietZones会出现位置异常的BUG

@Shane32
Copy link
Contributor

Shane32 commented Apr 2, 2024

English translation (via ChatGPT): When customizing the finderPatternImage, a bug occurs where drawing the QuietZones at the same time results in abnormal positioning.

@Shane32
Copy link
Contributor

Shane32 commented Apr 6, 2024

can_create_standard_qrcode_graphic_with_custom_finder tests this scenario. However, the finder image used is completely transparent.

Assuming we alter the test with this code:

            var finder = new Bitmap(70, 70);
            using (var g = Graphics.FromImage(finder))
            {
                g.FillRectangle(Brushes.Red, 0, 0, 70, 70);
            }

It would currently produce this image:

finder

With this PR (and the above alteration to the test) it will produce this image:

finder

I suggest the test be altered as shown above, the hash updated, and the PR merged.

@codebude
Copy link
Owner

Can't checkout the source branch to edit/add test cases. I'll merge first and then sent in further commits to fix the test case.

@codebude codebude merged commit db84288 into codebude:master Apr 22, 2024
@codebude
Copy link
Owner

Updated the test case in e094cd3
Testrunner finished successfully: https://github.com/codebude/QRCoder/actions/runs/8790250819

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.

3 participants