Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Pixel buffer memory layout is 5-6-5, not 5-3-5 #3

@Corion

Description

@Corion

Hi all,

thanks again for your very helpful Javascript code!

I'm playing around with a Loupedeck CT myself and documented the issue for Lua as well ( CommandPost/CommandPost#2369 ).

The pixel buffer memory layout is 5-6-5 r-g-b , and the bytes are stored little-endian. The code in index.js calculates the number as 5-5-3 r-b-g , big-endian. The upper "unused" three bits of the number belong to green.

I can't run your code, so I have to make vague suggestions here, but I think the two changes should be:

  1. Change the rgb2int() function to return a 5-6-5 number.
  2. Write that number as little-endian byte sequence instead of big-endian byte sequence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions