Skip to content

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.
@aykevl aykevl force-pushed the fix-image-mono-test branch from dce2ce8 to 0d8f650 Compare May 25, 2024 14:30
@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.

3 participants