feat: cleanup thumbnail #13

Merged
palid merged 1 commit from feat/cleanup-thumbnail into main 2025-02-12 12:22:07 +00:00
9 changed files with 36 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 750 KiB

View file

@ -1,6 +1,6 @@
{
"name": "CebulaCamp",
"short_name": "Cebula",
"name": "CebulaCamp 2025",
"short_name": "CebulaCamp",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
@ -18,4 +18,4 @@
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View 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

View file

@ -95,13 +95,6 @@ export default async function RootLayout({
<html lang={currentLang} className={`${oxanium.className} ${defaultTheme}`}>
<Head>
<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>
<body className="bg-background text:foreground antialiased">
<ThemeProvider>