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

platsch.bbclass: add conversion to XRGB8888 format #162

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

Conversation

rohieb
Copy link
Contributor

@rohieb rohieb commented Nov 21, 2024

With a similar command line as for RGB565, we can also generate XRGB8888 formats.

Patch by @OnkelUlla, tested by me.

(Originally I wanted to literalize this generation a bit and make use of ImageMagick's RGBA output format followed by a simple reordering of the color channels with the -color-matrix option as mentioned in this discussion, but then the image is always written top-down and the -flip option that we pass by default via ${SPLASH_MGK_CUSTOM_OPTION} would be broken. So I opted for Ulrich's solution for now.)

@rohieb
Copy link
Contributor Author

rohieb commented Nov 21, 2024

Note: this can also be cherry-picked cleanly to styhead, scarthgap, nanbield and mickledore as well.

# HACK: a quite compact way to create a bitmap in the XRGB8888 format is to
# let ImageMagick convert the source into its known BMP subtype XRGB8888 and
# to strip the BMP header by only using the final width * height * (8+8+8+8)/8
# bytes. For the i.MX6/i.MX8 the bitmap needs to be flipped (see [1]). This

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing i.MX6/8 specific here. Platsch expects the image to be top-down, as that's the natural order you would fill a dumb BO to back the DRM FB.

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