feat: cleanup thumbnail #13
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 750 KiB |
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "CebulaCamp",
|
"name": "CebulaCamp 2025",
|
||||||
"short_name": "Cebula",
|
"short_name": "CebulaCamp",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "/web-app-manifest-192x192.png",
|
"src": "/web-app-manifest-192x192.png",
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 88 KiB |
32
scripts/create-better-thumbnail.sh
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Ensure a video file is passed as an argument
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "Usage: $0 path/to/video.mp4"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VIDEO_FILE=$1
|
||||||
|
FRAME_FILE="frame.png"
|
||||||
|
OUTPUT_FILE="frame_transparent.png"
|
||||||
|
|
||||||
|
# Extract the first frame as a PNG
|
||||||
|
ffmpeg -i "$VIDEO_FILE" -vf "select=eq(n\,0)" -q:v 3 "$FRAME_FILE"
|
||||||
|
|
||||||
|
# Ensure ffmpeg succeeded
|
||||||
|
if [ ! -f "$FRAME_FILE" ]; then
|
||||||
|
echo "Failed to extract the first frame."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use ImageMagick to convert white to transparent
|
||||||
|
# Replace 'convert' with 'magick' for ImageMagick v7
|
||||||
|
magick "$FRAME_FILE" -fuzz 15% -transparent white "$OUTPUT_FILE"
|
||||||
|
|
||||||
|
# Notify the user of success
|
||||||
|
if [ -f "$OUTPUT_FILE" ]; then
|
||||||
|
echo "The transparent PNG has been saved as $OUTPUT_FILE"
|
||||||
|
else
|
||||||
|
echo "Failed to create a transparent PNG."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
@ -95,13 +95,6 @@ export default async function RootLayout({
|
||||||
<html lang={currentLang} className={`${oxanium.className} ${defaultTheme}`}>
|
<html lang={currentLang} className={`${oxanium.className} ${defaultTheme}`}>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.siteTitle}</title>
|
<title>{t.siteTitle}</title>
|
||||||
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
|
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
|
||||||
<meta name="apple-mobile-web-app-title" content="{t.siteTitle}" />
|
|
||||||
<link rel="manifest" href="/site.webmanifest" />
|
|
||||||
|
|
||||||
</Head>
|
</Head>
|
||||||
<body className="bg-background text:foreground antialiased">
|
<body className="bg-background text:foreground antialiased">
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
|
|
|
||||||