Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.21.1
Name Modified Size InfoDownloads / Week
Parent folder
OpenPublisher5-i386-windowsXP.exe 2026-11-15 56.5 MB
openpublisher5g_amd64-windows.exe 2026-11-15 81.1 MB
openpublisher5_amd64-windows-portable.exe 2026-11-15 183.2 MB
openpublisher5_amd64-windows.exe 2026-11-15 165.2 MB
openpublisher5_amd64-macos.dmg 2026-11-15 233.1 MB
openpublisher5_amd64-linux.run 2026-11-15 193.4 MB
openpublisher5_amd64-linux.rpm 2026-11-15 215.4 MB
openpublisher5_amd64-linux.flatpak 2026-11-15 153.6 MB
openpublisher5_amd64-linux.deb 2026-11-15 156.2 MB
openpublisher5_amd64-linux.AppImage 2026-11-15 166.4 MB
openpublisher5_amd64-freebsd.pkg 2026-11-15 185.5 MB
5.21.1_ AI Image Transparent Background Auto-Cutout (Stickers, Objects _ 3D Titles) source code.tar.gz 2026-11-15 123.1 MB
5.21.1_ AI Image Transparent Background Auto-Cutout (Stickers, Objects _ 3D Titles) source code.zip 2026-11-15 123.7 MB
README.md 2026-11-15 6.3 kB
Totals: 14 Items   2.0 GB 0

📋 Summary

Version 5.21.1 upgrades Tab 2 (AI Image (Photo & Art)) in the AI Studio dialog (extensions/ai-assistant.js) to support native transparent-background PNG cutouts right out of the box:

  1. Added the Transparent background (auto-cutout for stickers, objects & titles) option under Placement (checked by default when Insert as Canvas Picture is selected, automatically unchecked when switching to Set as Page Background).
  2. Instructs FLUX.1 to isolate single subjects cleanly on a solid flat background and converts the generated result client-side via removeSolidBackgroundToPng(dataUrl) using a fast typed-array Breadth-First Flood-Fill, enclosed counter-hole detection, anti-aliased edge ramp, color decontamination, and 1px neighbor feathering.
  3. Places transparent cutouts onto the canvas using object-fit: contain inside a transparent wrapper so sticker, object, and title edges are never cropped (5.21.1 synchronized across sw.js, index.html, and versioned modules).

op-AIImageTransparentBackgroundAndAutoCutourEngine


🛠️ Key Improvements

1. Client-Side Flood-Fill & Edge Anti-Aliasing Helper (removeSolidBackgroundToPng in extensions/ai-assistant.js)

  • Decodes the generated image onto an offscreen native-resolution <canvas> and detects the dominant background RGB by sampling quantized color buckets across the outer 2px border/corner perimeter.
  • Runs a Uint8Array / Int32Array 4-connected Breadth-First Flood-Fill from all outer edge pixels (dist <= 48 via Math.hypot), automatically stopping at the subject's outer contour so interior whites and creams (such as white labels or highlights inside an object) stay untouched.
  • Scans unvisited interior pixels matching the detected background (dist <= 14) with low local neighbor gradient (<= 14) to flood-fill enclosed background counter holes inside letters (O, A, B, P, R) or handle loops.
  • Applies smooth edge matting on the flood-filled region and its 1px immediate boundary:
  • Core background pixels (dist <= 26) become fully transparent (alpha = 0).
  • Transition edge pixels (26 < dist <= 58) receive a smooth alpha ramp Math.round(((dist - 26) / 32) * 255) alongside RGB color decontamination toward the foreground tint to remove white halos.
  • Diagonal boundary corners touching multiple transparent pixels get a subtle 1px feather pass (0.88 factor) before exporting as canvas.toDataURL('image/png').

2. Tab 2 UI & End-to-End Generation Integration (extensions/ai-assistant.js)

  • Added #op-ai-img-transparent (#op-ai-img-transparent-wrap) beneath the Placement radio group in ensureModalMarkup(), defaulting to checked for Insert as Canvas Picture and automatically toggling when switching between Insert as Canvas Picture and Set as Page Background.
  • Updated generateAIImage() to append isolated solid-white cutout framing instructions when transparent is enabled, report the 'matting' status step in handleSubmitImage(), pass { transparent: true } through AIAssistant.removeSolidBackgroundToPng, and safely fall back to the raw image if decoding fails.
  • Updated insertAIImageToCanvas() so transparent cutouts insert into a square-proportioned container with background: transparent and object-fit: contain (preventing sticker or 3D title cropping), while full-scene images and page backgrounds continue using object-fit: cover.
  • Exposed removeSolidBackgroundToPng on window.AIAssistant and forwarded transparent props when pre-resolving ai_image layout elements.

🔄 Version Synchronization (v5.21.1)

Component Target Version Updated Reference
Service Worker v5.21.1 open-publisher-v5-21-1-1 and header comment in sw.js
AI Studio Engine v5.21.1 Header version, transparent cutout pipeline, and AIAssistant.VERSION (5.21.1) in extensions/ai-assistant.js
Template Router & 404 v5.21.1 Cachebusters and deep-link router comment in elements/templates/templates.js and 404.html
Dashboard Start Screen v5.21.1 Asset query strings updated to ?v=5.21.1 in ui/dashboard.js
About Dialog & UI Interactions v5.21.1 Header comment, Knowledge Base icon query strings, and About dialog (v5.21.1) in extensions/ui-interactions.js
Print & Watermark Engines v5.21.1 Header comments in extensions/print-engine.js and extensions/watermark-engine.js
PWA Installer v5.21.1 Service worker registration sw.js?v=5.21.1 in extensions/pwa-install.js
Application Cachebusters v5.21.1 All 106 script, stylesheet, and asset query strings updated to ?v=5.21.1 in index.html
README Badges v5.21.1 Patreon and Facebook badge query strings updated to ?v=5.21.1 in README.md (preserving the 5.20.8 Gecko binary download link)

✅ Checklist Completed

  • [x] Implement removeSolidBackgroundToPng(dataUrl) in extensions/ai-assistant.js with outer 2px border sampling, BFS edge flood-fill, interior counter hole clearing, transition ramp (26 < dist <= 58), RGB decontamination, and 1px neighbor feathering
  • [x] Add Transparent background checkbox (#op-ai-img-transparent) to Tab 2 Placement UI, synced with Insert as Canvas Picture vs Set as Page Background radio selection
  • [x] Update generateAIImage(), handleSubmitImage(), and insertAIImageToCanvas() for isolated solid-background prompting, 'matting' status updates, and non-cropping object-fit: contain PNG placement
  • [x] Verify live in browser (http://127.0.0.1:8125/): UI radio-checkbox sync, synthetic pixel-alpha verification (corner alpha 0, interior "O" counter alpha 0, cream label preserved at alpha 255, smooth boundary alpha 224), end-to-end AI worker prompt & PNG canvas insertion, and zero uncaught JS console errors
  • [x] Synchronize version 5.21.1 across sw.js (open-publisher-v5-21-1-1), index.html, and versioned modules

🚀 Version 5.21.1 - Open Publisher

Source: README.md, updated 2026-11-15