17 lines
720 B
Bash
17 lines
720 B
Bash
#!/bin/bash
|
|
|
|
# Create a 2160x1080 true color bitmap canvas with black background
|
|
convert -size 2160x1080 canvas:black /tmp/black_canvas.png
|
|
|
|
# Place the image in the center of the canvas, blending the transparent background
|
|
composite -gravity center /data/openpilot/selfdrive/clearpilot/theme/clearpilot/images/boot_logo.png /tmp/black_canvas.png /tmp/centered_image.png
|
|
|
|
# Rotate the image clockwise 90 degrees
|
|
convert /tmp/centered_image.png -rotate 90 /tmp/rotated_image.png
|
|
|
|
# Save the image as a JPEG with 95% quality
|
|
convert /tmp/rotated_image.png -quality 95 /data/openpilot/system/clearpilot/startup_logo/bg.jpg
|
|
|
|
# Clean up temporary files
|
|
rm /tmp/black_canvas.png /tmp/centered_image.png /tmp/rotated_image.png
|