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

splash: Select splash image based on native resolution #381

Merged
merged 1 commit into from
May 28, 2016
Merged

splash: Select splash image based on native resolution #381

merged 1 commit into from
May 28, 2016

Conversation

MilhouseVH
Copy link
Contributor

@MilhouseVH MilhouseVH commented May 21, 2016

With this PR, init will parse fbset for the currently set native resolution. It will then use a matching splash image if one exists - if not, the 1080 image will be used.

Currently this PR is missing a 720p splash image, I'll add one when it becomes available. The size of a 720p PNG splash should be 80KB 8KB or less. If not too large (in terms of file size) I may also add a 4K (3840x2160) image.

With this PR, the vast majority of native resolutions - 1080p, 720p, and (1024x)768 - will be catered for, and shouldn't need the artwork to be resized by plymouth-lite.

Any other "corner case" resolutions will use the 1080 artwork, and plymouth-lite (with or without bilinear, #353) will resize to the display resolution.

Extending this in future to support additional native resolution artwork should be trivial - just add the splash_<vertical resolution>.png artwork.

As an extra, this PR adds support for SWITCH_FRAMEBUFFER, allowing custom frame buffer resolutions to be configured from the command line. For example, adding setfbres=720 would force fbset -g 1280 720 1280 720 32 (setfbres=1080 is also supported). An entirely custom resolution can be set with (for example) setfbres=640,480,640,480,32.

@MilhouseVH
Copy link
Contributor Author

MilhouseVH commented May 21, 2016

Custom distributions should note that the filenames of the splash images are changing with this PR:

splash_full.png to splash_1080.png
splash_1024.png to splash_768.png

Distributions must at the very least provide a splash image named splash_1080.png.


# Select splash image based on current native resolution
if [ -z "$SPLASHIMAGE" ]; then
vres="$(fbset | grep geometry | awk '{ print $3 }')"
Copy link
Contributor

@vpeter4 vpeter4 May 22, 2016

Choose a reason for hiding this comment

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

Little more optimzed
vres="$(fbset | awk '/geometry/ { print $3 }')"

@MilhouseVH
Copy link
Contributor Author

@vpeter4 thanks, updated.

@MilhouseVH
Copy link
Contributor Author

Updated with 1280x720, 1920x1200 and 3840x2160 artwork.:

-rw-rw-r-- 1 neil neil  9278 May 22 20:03 splash-1080.png
-rw-rw-r-- 1 neil neil  9504 May 22 20:08 splash-1200.png
-rw-rw-r-- 1 neil neil 23284 May 22 20:08 splash-2160.png
-rw-rw-r-- 1 neil neil  6073 May 22 20:08 splash-720.png
-rw-rw-r-- 1 neil neil  5972 May 22 20:08 splash-768.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants