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

Projector color format #257

Open
JanHolger opened this issue Jan 1, 2023 · 2 comments
Open

Projector color format #257

JanHolger opened this issue Jan 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@JanHolger
Copy link

Describe the bug
I've been playing around with the projector and it's awesome but the docs seem to be incorrect about the color format. According to the docs, the color format for the projector should be r5g6b5. I was getting wrong colors though so I switched around the colors and the actual color format seems to be b5r6g5.

To Reproduce
Steps to reproduce the behavior:

  1. Build a simple computer+projector setup (assuming projector is on /dev/fb0)
  2. Execute lua -e 'io.open("/dev/fb0","w"):write(("%\0"):rep(640*480))' (This will fill the entire buffer with 0b1111100000000000, that should be red)
  3. Projector image will be blue instead of red

Expected behavior
Either the colors should be according to the docs or the docs need to be updated to the correct color format.

Also is there any reason to this weird color format? I guess colors get translated back into normal rgb anyway so I don't really get the point. Yes, it does safe up some memory but at the cost of the encoding that needs to be done to bring the image into your format.

Screenshots
image

Versions (please complete the following information):

  • Minecraft: 1.18.2
  • Forge: 40.1.93
  • OC2: 0.1.8
@JanHolger JanHolger added the bug Something isn't working label Jan 1, 2023
@Beyley
Copy link

Beyley commented Apr 12, 2023

It seems to be rgb565 for me, i wrote an app to display PNG files onto the screen, and my conversion code assums RGB565, and it does produce correct output, perhaps your test is wrong?
https://github.com/Beyley/fbz/blob/c1211675f6bec0b99d68cf3dd42c33864aca23e7/src/fmtconv.zig#L16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@JanHolger @Beyley and others