clean app icon script

This commit is contained in:
polv committed 2026-03-24 12:59:56 +07:00
1 parent 9fc970b295
commit 8365c8d635
3 files changed
+2 -3

No files matched your search

+1 -3
View File
@@ -12,7 +12,7 @@ async function resizeAndMakeWhiteTransparent(inputPath, outputPath) {
if (!origW || !origH) throw new Error("Unable to read image dimensions");
const targetW = Math.max(origW, origH);
const targetH = Math.max(origW, origH);
const targetH = targetW;
// Resize and output raw RGBA buffer
const { data, info } = await img
@@ -23,8 +23,6 @@ async function resizeAndMakeWhiteTransparent(inputPath, outputPath) {
const { width: w, height: h, channels } = info; // channels should be 4 (RGBA)
if (channels < 3) throw new Error("Unexpected channel count");
console.log(targetH, targetW, info);
// Modify alpha for near-white pixels
for (let i = 0; i < data.length; i += channels) {
const r = data[i];
+1
View File
@@ -6,6 +6,7 @@
"scripts": {
"start": "tauri dev",
"android:start": "tauri android run",
"android:install:debug": "adb install -r src-tauri/gen/android/app/build/outputs/apk/arm64/debug/app-arm64-debug.apk",
"android:server": "tauri android dev",
"android:build:debug": "tauri android build --debug",
"build": "tauri build",
Binary file not shown.