refactor: rename tool display name to "PNG Transparency Fixer"

This commit is contained in:
SnapOtter
2026-05-06 18:53:37 +08:00
parent c47ec34021
commit 84e62e6132
10 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -257,7 +257,7 @@ Intelligently resizes images by removing or adding low-energy seams, preserving
Max input edge before auto-downscaling: **1200 px**.
## Transparency Fixer
## PNG Transparency Fixer
**Function:** `fixTransparency`
**Tool route:** `transparency-fixer`
+1 -1
View File
@@ -152,7 +152,7 @@ All AI tools run on your hardware (CPU or NVIDIA GPU). No internet required.
| `restore-photo` | Photo Restoration | Multi-step pipeline | `mode` (auto/light/heavy), `scratchRemoval`, `faceEnhancement`, `fidelity`, `denoise`, `denoiseStrength`, `colorize` |
| `passport-photo` | Passport Photo | MediaPipe landmarks | `country` (37 countries), `printLayout` (4x6/A4/none), `backgroundColor` |
| `content-aware-resize` | Content-Aware Resize | Seam carving (caire) | `width`, `height`, `protectFaces`, `blurRadius`, `sobelThreshold`, `square` |
| `transparency-fixer` | Transparency Fixer | BiRefNet HR-matting | `defringe` (0-100), `outputFormat` (png/webp) |
| `transparency-fixer` | PNG Transparency Fixer | BiRefNet HR-matting | `defringe` (0-100), `outputFormat` (png/webp) |
### Watermark & Overlay
+1 -1
View File
@@ -71,7 +71,7 @@ pnpm dev
| **Essentials** | Resize, Crop, Rotate & Flip, Convert, Compress |
| **Optimization** | Optimize for Web, Strip Metadata, Edit Metadata, Bulk Rename, Image to PDF, Favicon Generator |
| **Adjustments** | Adjust Colors, Sharpening, Replace Color |
| **AI Tools** | Remove Background, Upscale, Erase Object, OCR, Blur Faces, Smart Crop, Image Enhancement, Enhance Faces, Colorize, Noise Removal, Red Eye Removal, Restore Photo, Passport Photo, Content-Aware Resize, Transparency Fixer |
| **AI Tools** | Remove Background, Upscale, Erase Object, OCR, Blur Faces, Smart Crop, Image Enhancement, Enhance Faces, Colorize, Noise Removal, Red Eye Removal, Restore Photo, Passport Photo, Content-Aware Resize, PNG Transparency Fixer |
| **Watermark & Overlay** | Text Watermark, Image Watermark, Text Overlay, Image Composition |
| **Utilities** | Image Info, Compare, Find Duplicates, Color Palette, QR Code Generator, Barcode Reader, Image to Base64 |
| **Layout** | Collage, Stitch, Split, Border & Frame |
+1 -1
View File
@@ -239,7 +239,7 @@ const tools: { name: string; description: string; category: string; icon: Lucide
icon: Scaling,
},
{
name: "Transparency Fixer",
name: "PNG Transparency Fixer",
description: "Fix fake transparent PNGs with AI matting",
category: "ai",
icon: Droplets,
+1 -1
View File
@@ -243,7 +243,7 @@ export const TOOLS: Tool[] = [
},
{
id: "transparency-fixer",
name: "Transparency Fixer",
name: "PNG Transparency Fixer",
description: "Fix fake transparent PNGs in one click",
category: "ai",
icon: "Wand2",
+1 -1
View File
@@ -125,7 +125,7 @@ export const en = {
"Create government-compliant passport, visa, and ID photos with auto face detection",
},
"transparency-fixer": {
name: "Transparency Fixer",
name: "PNG Transparency Fixer",
description: "Fix fake transparent PNGs in one click",
},
"watermark-text": { name: "Text Watermark", description: "Add text watermark overlay" },
+2 -2
View File
@@ -835,10 +835,10 @@ test.describe("GUI AI Tools", () => {
// ========================================================================
// TRANSPARENCY FIXER
// ========================================================================
test.describe("Transparency Fixer", () => {
test.describe("PNG Transparency Fixer", () => {
test("renders tool page with dropzone", async ({ loggedInPage: page }) => {
await page.goto("/transparency-fixer");
await expect(page.getByText("Transparency Fixer").first()).toBeVisible();
await expect(page.getByText("PNG Transparency Fixer").first()).toBeVisible();
await expect(page.getByText("Upload from computer")).toBeVisible();
});
+1 -1
View File
@@ -41,7 +41,7 @@ const TOOLS_WITH_DROPZONE = [
{ id: "vectorize", name: "Image to SVG" },
{ id: "gif-tools", name: "GIF" },
{ id: "noise-removal", name: "Noise Removal" },
{ id: "transparency-fixer", name: "Transparency Fixer" },
{ id: "transparency-fixer", name: "PNG Transparency Fixer" },
];
const TOOLS_WITHOUT_DROPZONE = [{ id: "qr-generate", name: "QR Code" }];
+3 -3
View File
@@ -2,7 +2,7 @@ import path from "node:path";
import { expect, isAiSidecarRunning, test } from "./helpers";
// ---------------------------------------------------------------------------
// Transparency Fixer tool - e2e tests.
// PNG Transparency Fixer tool - e2e tests.
// Covers UI rendering, advanced settings, processing flow, and result display.
// ---------------------------------------------------------------------------
@@ -29,7 +29,7 @@ async function fixTransparencyAndWait(page: import("@playwright/test").Page) {
await expect(page.getByTestId("transparency-fixer-submit")).toBeVisible({ timeout: 10_000 });
}
test.describe("Transparency Fixer tool", () => {
test.describe("PNG Transparency Fixer tool", () => {
async function skipIfFeatureNotInstalled(page: import("@playwright/test").Page) {
await page.goto("/transparency-fixer");
try {
@@ -48,7 +48,7 @@ test.describe("Transparency Fixer tool", () => {
await skipIfFeatureNotInstalled(page);
// Tool title shown in the settings panel header
await expect(page.getByText("Transparency Fixer")).toBeVisible();
await expect(page.getByText("PNG Transparency Fixer")).toBeVisible();
// Description text from the settings component
await expect(page.getByText("Upload a PNG with a fake transparent background")).toBeVisible();
+5 -5
View File
@@ -89,7 +89,7 @@ async function postWithRawSettings(fileBuffer: Buffer, filename: string, rawSett
// ═══════════════════════════════════════════════════════════════════════════
// Happy path
// ═══════════════════════════════════════════════════════════════════════════
describe("Transparency Fixer - Happy path", () => {
describe("PNG Transparency Fixer - Happy path", () => {
it("processes fake-transparency PNG with default settings", async () => {
const res = await postTransparencyFixer(FAKE_TRANSPARENCY, "test-fake-transparency.png", {});
expect([200, 202, 501]).toContain(res.statusCode);
@@ -115,7 +115,7 @@ describe("Transparency Fixer - Happy path", () => {
// ═══════════════════════════════════════════════════════════════════════════
// Advanced settings
// ═══════════════════════════════════════════════════════════════════════════
describe("Transparency Fixer - Advanced settings", () => {
describe("PNG Transparency Fixer - Advanced settings", () => {
it("accepts defringe at 0", async () => {
const res = await postTransparencyFixer(PNG, "test.png", { defringe: 0 });
expect([200, 202, 501]).toContain(res.statusCode);
@@ -140,7 +140,7 @@ describe("Transparency Fixer - Advanced settings", () => {
// ═══════════════════════════════════════════════════════════════════════════
// Input format coverage
// ═══════════════════════════════════════════════════════════════════════════
describe("Transparency Fixer - Input format coverage", () => {
describe("PNG Transparency Fixer - Input format coverage", () => {
it("accepts JPEG input", async () => {
const res = await postTransparencyFixer(JPG, "photo.jpg", {});
expect([200, 202, 501]).toContain(res.statusCode);
@@ -170,7 +170,7 @@ describe("Transparency Fixer - Input format coverage", () => {
// ═══════════════════════════════════════════════════════════════════════════
// Error handling
// ═══════════════════════════════════════════════════════════════════════════
describe("Transparency Fixer - Error handling", () => {
describe("PNG Transparency Fixer - Error handling", () => {
it("rejects requests without a file", async () => {
const { body, contentType } = createMultipartPayload([
{ name: "settings", content: JSON.stringify({}) },
@@ -237,7 +237,7 @@ describe("Transparency Fixer - Error handling", () => {
// ═══════════════════════════════════════════════════════════════════════════
// Edge cases
// ═══════════════════════════════════════════════════════════════════════════
describe("Transparency Fixer - Edge cases", () => {
describe("PNG Transparency Fixer - Edge cases", () => {
it("handles 1x1 pixel image", async () => {
const res = await postTransparencyFixer(TINY, "tiny.png", {});
expect([200, 202, 422, 501]).toContain(res.statusCode);