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

image: fix TestMono test #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

image: fix TestMono test #6

wants to merge 1 commit into from

Conversation

aykevl
Copy link
Owner

@aykevl aykevl commented May 25, 2024

I wanted to fix the TODO (whether the decoded image was actually valid) but found that it wasn't:

  • The size wasn't correct. The TinyGo logo was actually 304x255 in size, not 299x255 (it looks like it was created with a tool that assumes every row starts at a byte aligned line, which image.Mono doesn't).
  • There seems to be a problem when the image is decoded as a pixel.Monochrome, but I haven't yet figured out why.

@deadprogram can you take a look at this? Does this make sense?

I wanted to fix the TODO (whether the decoded image was actually valid)
but found that it wasn't:

  - The size wasn't correct. The TinyGo logo was actually 304x255 in
    size, not 299x255 (it looks like it was created with a tool that
    assumes every row starts at a byte aligned line, which image.Mono
    doesn't).
  - There seems to be a problem when the image is decoded as a
    pixel.Monochrome, but I haven't yet figured out why.
@deadprogram
Copy link
Contributor

How come the test image has that dark vertical line on the rightmost margin?

@aykevl
Copy link
Owner Author

aykevl commented May 25, 2024

Because that's what the raw image contains. See my previous comment:

The size wasn't correct. The TinyGo logo was actually 304x255 in size, not 299x255 (it looks like it was created with a tool that assumes every row starts at a byte aligned line, which image.Mono doesn't).

So basically the raw image does have the dark vertical line on the right, but depending on how it is being interpreted this may or may not be visible. The way that image.Mono interprets bitmaps, the dark line is there.

@deadprogram
Copy link
Contributor

We probably should replace that image with one that is "correct", but that is separate issue from this test.

@aykevl
Copy link
Owner Author

aykevl commented Jun 1, 2024

Yes, indeed.
I can do it in this PR or in a separate PR, do you have a preference?

@deadprogram
Copy link
Contributor

It would be fine to correct that in this PR, I think.

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.

2 participants