Skip to content

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.

@ejoerns
Copy link
Member

ejoerns commented Apr 8, 2025

How should we proceed here? I can remember we had an internal discussion about whether these conversations should actually be part of a class, handled by a script, or just done once and placed in the BSP as files in the appropriate format.

I'd be happy with any of the solutions, I guess.

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.

5 participants