clean app icon script
This commit is contained in:
1 parent
9fc970b295
commit
8365c8d635
3 files changed
+2
-3
No files matched your search
+1
-3
@@ -12,7 +12,7 @@ async function resizeAndMakeWhiteTransparent(inputPath, outputPath) {
|
|||||||
if (!origW || !origH) throw new Error("Unable to read image dimensions");
|
if (!origW || !origH) throw new Error("Unable to read image dimensions");
|
||||||
|
|
||||||
const targetW = Math.max(origW, origH);
|
const targetW = Math.max(origW, origH);
|
||||||
const targetH = Math.max(origW, origH);
|
const targetH = targetW;
|
||||||
|
|
||||||
// Resize and output raw RGBA buffer
|
// Resize and output raw RGBA buffer
|
||||||
const { data, info } = await img
|
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)
|
const { width: w, height: h, channels } = info; // channels should be 4 (RGBA)
|
||||||
if (channels < 3) throw new Error("Unexpected channel count");
|
if (channels < 3) throw new Error("Unexpected channel count");
|
||||||
|
|
||||||
console.log(targetH, targetW, info);
|
|
||||||
|
|
||||||
// Modify alpha for near-white pixels
|
// Modify alpha for near-white pixels
|
||||||
for (let i = 0; i < data.length; i += channels) {
|
for (let i = 0; i < data.length; i += channels) {
|
||||||
const r = data[i];
|
const r = data[i];
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "tauri dev",
|
"start": "tauri dev",
|
||||||
"android:start": "tauri android run",
|
"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:server": "tauri android dev",
|
||||||
"android:build:debug": "tauri android build --debug",
|
"android:build:debug": "tauri android build --debug",
|
||||||
"build": "tauri build",
|
"build": "tauri build",
|
||||||
|
|||||||
Binary file not shown.
Reference in new issue
Block a user