Skip to content

Latest commit

 

History

History
148 lines (117 loc) · 38.3 KB

README.md

File metadata and controls

148 lines (117 loc) · 38.3 KB

Photo Studio

Live app: ps.puter.com

Photo Studio is an open-source alternative to Adobe Photoshop: a browser-based raster image editor covering layers, masks, adjustment layers, selections, painting and retouching tools, filters, type, shapes and paths, color management and PSD interchange. It is built with vanilla TypeScript, HTML, CSS and Vite; WebGPU is the primary compositor, with a WebGL2 fallback. Puter.js provides optional cloud storage and AI services. There is no application server, database or API key to configure.

Run

npm ci
npm run dev

Open the local URL printed by Vite. A prebuilt Rust WebAssembly module is committed in public/photo-engine.wasm, so Rust is not needed for normal development.

npm run build
npm run preview

Serve dist/ over HTTPS in production; WebGPU requires a secure context (localhost is allowed during development).

Workspace

  • Menus: a menu bar generated from a command registry. Every visible command is implemented; unimplemented ones are not shown. Edit → Search (⌘F) finds any command, tool or panel. Keyboard shortcuts follow professional editor conventions and are listed by menu under Help → Keyboard Shortcuts; shortcuts, menus (hide or color items) and the toolbar (extra tools overflow) can be customized. Windows and Linux use Ctrl in place of ⌘.
  • Documents: multiple documents open as tabs, each with its own history. Window → Arrange tiles them side by side (tile, 2/3/4/6-up), floats them as movable windows inside the workspace, opens several windows onto one document, and matches zoom, location and rotation between windows.
  • Workspaces: Essentials, Photography, Painting, Graphic and Web and Motion panel layouts, plus saved, deletable and lockable custom workspaces; the options bar and tools panel can be hidden. Tool presets save a tool with its options (Tool Presets panel and a picker in the options bar); the Preset Manager renames, reorders, imports and exports brushes, swatches, gradients, styles, patterns, shapes and tool presets.
  • Tools panel: tools grouped in slots with flyouts (right-click or long-press); a key selects a tool and Shift+key cycles its group; tooltips say what each tool does. Foreground/background color chips, a mask mode for painting selections, and screen modes sit below.
  • Options bar: settings for the active tool, each with a tooltip naming its keys: [ ] brush size, Shift+[ ] hardness, number keys opacity (two digits for an exact value; the selected layers' opacity when no painting tool is active), Shift+number flow. Alt+[ ] steps through layers and Shift+= / Shift+- cycle blend modes.
  • Status bar: an editable zoom field and a document information item (document sizes, dimensions, color profile, memory, measurement scale or the current tool) chosen from its menu.
  • Views: rotate the canvas (Rotate View tool, R), mirror the view, 100%/200%/print size, Actual Size (one image pixel per physical screen pixel on high-density screens), fit the image or the selected layers, pixel aspect ratio correction, and a pattern preview that repeats the image around itself while brush strokes wrap across its edges, with optional tile bounds.
  • Panels: color, swatches, gradients, patterns, properties, adjustments, layers, channels and paths in the dock; a timeline under the canvas; history, recorded actions, scripts, navigator, info, histogram, notes, measurement log, brushes, text formatting, styles, layer comps and tool presets in a collapsible strip, plus Clone Source, Glyphs, Character and Paragraph Styles, Shapes, Comments, Libraries, Provenance, the Assistant and Generation History. Panels can be resized and collapsed and are listed under Window → Panels. Every panel has a menu with its commands plus minimize, collapse to icon, dock as tab and close; strip icons are grouped by kind.
  • Canvas: rulers (pixels, inches, centimeters, millimeters, points, picas or percent), guides (drag from the rulers; canvas guides, and artboard guides that belong to an artboard and move with it, each shown or hidden separately; select, edit and clear selected guides; guides along the bounds and centers of shapes and layers; column and row layouts on the canvas or an artboard), grid, pixel grid at high zoom, layer edges, alignment guides with equal-spacing hints while moving layers, snapping to guides, grid, layers and document bounds, smooth zoom and pan (Space-drag, wheel, pinch, zoom tool with scrubby zoom), marching-ants selections and on-canvas transform handles.
  • Learn: Help → Hands-on Tutorials offers six guided tours (layers, masking a subject, adjustment layers, retouching a blemish, text and shapes, exporting) on generated sample images; a card points at the control to use and moves on when you perform the step, with back, skip and restart. Help → What's New lists recent features with a Try it button for each. Both are also on the start screen.
  • Libraries: a Libraries panel (Window → Libraries) keeps named libraries of colors, gradients, patterns, character and paragraph styles, layer styles, brushes and graphics for use in any document. The + menu adds the foreground or background color, the current gradient, pattern or brush, the selected layer's style, a text layer's styles, the selected layers (kept as a layered embedded object) or the selection; a click applies an item (sets the color, applies the style to the selected layers or text, places a graphic) and graphics can be dropped onto the canvas or placed linked so they update when the library item is redefined. Grid and list views, search across libraries, grouping by type, drag to reorder or move between libraries, right-click commands, and libraries that can be created, renamed, duplicated, deleted, exported and imported as one file. Libraries live in this browser and, when signed in to Puter, sync through the app's Puter folder (edits from other tabs and devices merge rather than overwrite, and edits made while signed out or offline are kept and sent on the next sync); the panel shows the sync status.
  • Preferences: Edit → Preferences (⌘K) opens a searchable settings window (General, Interface, Workspace, Tools, History & Autosave, File Handling, Export, Performance, Cursors, Transparency & Gamut, Units & Rulers, Guides/Grid/Slices, Type) with live changes and JSON import/export: UI scaling and font size, highlight and canvas colors, tooltips, documents as tabs or floating windows, animated zoom, flick panning, overscroll, brush cursors and Alt+right-drag brush sizing, transparency grid, guide and grid appearance (lines, dashes, dots, subdivisions, units), non-linear history, smart quotes, missing-glyph fallback and more.
  • Dark, medium, light and system themes, with text contrast of at least 4.5:1 and one original icon family drawn on a shared 24-unit grid.

Editing features

  • Layers: pixel layers (destructive, tile-based), embedded objects (placed files or converted layers kept as nested documents: edit contents in a tab, shared instances, linked files, converting embedded contents to a linked file on the device or Puter, stack modes, skew/distort/warp re-rendered from the content), text, shapes, solid/gradient/pattern fill layers, adjustment layers and groups (including pass-through). 27 blend modes, opacity and fill opacity, advanced blending (Blend If ranges per channel with split handles, channel exclusion, shallow and deep knockout, interior effects and clipped layers blended as a group, masks that hide effects), clipping masks, locks, layer masks (with Refine Mask Edge, which re-mattes the edge from the layer's pixels) and vector masks, layer effects (drop and inner shadows, outer and inner glows, bevel and emboss, satin, color/gradient/pattern overlays, stroke; a document-wide global light, and Create Layers to split effects into separate layers), merge, stamp and flatten, align and distribute, linked layers that move together, a Background layer, filtering by kind or name, finding and isolating layers, and cleanup scripts (delete empty or hidden layers, flatten all effects or masks), Mask All Objects (a masked layer copy, masked group or saved selection for each detected object) and Harmonize (match a layer's color and tone to the image beneath it, as a clipped adjustment or in its pixels). Paste Into and Paste Outside paste through a mask made from the selection.
  • Layout: artboards (Artboard tool, size presets, backgrounds, clipping, + buttons for neighbors, layers nest automatically when moved across artboards) exported to files or a PDF; frames (Frame tool, rectangles and ellipses that mask the image placed or dropped into them); a Layer Comps panel for alternative layouts, exported to files or a PDF; slices (user, layer-based and automatic) with Export for Web (2-up/4-up previews, size estimates, per-slice formats, ZIP with an optional HTML table); Copy CSS and Copy SVG for layers.
  • Selections: rectangular, elliptical and single row/column selections; freehand, polygonal and edge-snapping lassos; brush-based, object-based and color-tolerance selection; automatic subject and sky selection, selection by color range and by focus (in-focus areas), and an edge-refinement workspace (refine edges, remove color fringes); feather, expand, contract, smooth, border, grow, similar, inverse, transform selection, a mask mode for painting selections, and saved selections as alpha channels.
  • Painting: brush, pencil, mixer brush (paint that loads, runs dry and mixes subtractively with wet canvas paint), eraser, background and color-tolerance erasers, color replacement, clone and pattern stamps, painting from an earlier history state (also as stylized art strokes), blur, sharpen, smudge, dodge, burn, sponge, paint bucket and gradient tools. Brushes support hardness, spacing, roundness, angle, tips sampled from the image, pressure, jitter, scattering, flow/opacity build-up and smoothing. Clone Source keeps five sources (from any open document) with offset, scale, rotation, flips and an overlay, shared by the clone stamp and healing brush, sampling the current layer, current and below, or all layers.
  • Retouching: one-click blemish healing, a healing brush, patching, red-eye correction, object removal, Context Move and Context Fill (an independent PatchMatch-based fill), plus optional AI Fill, AI Expand, Generate Image (from a prompt, with style and aspect presets and up to four variations to choose from) and Edit with Prompt (change the selection or layer by describing the edit) through Puter's AI service, which only run when you explicitly invoke them and add their results as new layers that keep the prompt.
  • Assistant: describe an edit in words (the Assistant panel, Edit → Describe an Edit…, or the start screen, optionally with an image) and the Assistant, a Claude model through Puter's AI service (Claude Fable 5.1 by default; the model is chosen in the panel menu), plans it with Photo Studio's own commands and operations: selections, crops to an aspect ratio, adjustment layers with settings, layer styles, text, layer properties and filters with settings. The plan shows as readable steps linked to their menu entries; every step is checked first (unknown commands, settings of the wrong type or out of range, steps that need a selection when there is none are explained in plain words), and steps can be edited, reordered or removed, then run all at once or step by step and stopped, as one undo step named after the request. Generative steps only open their dialog prefilled, so nothing is generated without pressing Generate. Questions get short answers with Show me buttons that open the menu item, select the tool or show the panel. The model sees the document's size and layer list and, optionally, a small preview; each document keeps its own conversation.
  • Generation History: every AI result (Generate Image, Edit with Prompt, AI Fill, AI Expand, the AI layer of Upscale and images the Assistant asked for) is kept in this browser with its prompt, settings, source document and time (up to 150 results and 250 MB, oldest removed first), filtered by kind and searched by prompt; results can be placed as a new layer, opened as a document, have their prompt copied, reopen their dialog with the same settings, or be deleted.
  • Adjustments: brightness/contrast, levels, curves, exposure, vibrance, hue/saturation, color balance, black & white, photo filter, channel mixer, color lookup (.cube), invert, posterize, threshold, gradient map and selective color, plus Light & Tone, Color & Vibrance, Clarity & Dehaze (local contrast and haze removal) and Grain, as adjustment layers (rendered on the GPU) or destructive commands, plus auto tone/contrast/color, desaturate, equalize, shadows/highlights, replace color and match color.
  • Filters: about 70 filters for blurring (including shape, field, path, spin, tilt-shift and iris blurs), distortion, noise, pixelation, rendering (including flames along paths, decorative picture frames and procedural trees), sharpening, stylizing and HSB/HSL channel conversion, with previews computed in a worker; Denoise (non-local means with automatic noise estimation and edge-aware color smoothing) and Sharpen Details (deconvolution of soft or out-of-focus blur that does not amplify noise); Portrait & Restore, a workspace that stacks Skin Smoothing (skin found automatically, frequency separation that keeps pores), JPEG Artifact Removal, Photo Restoration (dust and scratch repair with a defect overlay, noise, faded color, print dots), Colorize (click color hints that spread up to edges, or an AI suggestion), Color Transfer (the look of another document, layer or file, per tonal range), Depth Blur (estimated or layer-based depth, bokeh, haze, warmth, grain, depth map as a channel), Style Transfer (painterly, ink, pencil, watercolor and print looks, or AI from a prompt and reference) and Scene Changer (AI time of day, season or weather, with the subject protected) in one pass, with a split, side-by-side or hold-to-compare preview, presets, and output to the layer, a new (masked) layer, a new document or a Live Filter; a filter browser with thumbnails, an interactive push-and-warp workspace, Develop (raw-style tone and color controls), lens correction, Wide Angle Correction (constraint lines become straight), Perspective Planes (clone, paint and paste on surfaces in perspective), and repeating or fading the last filter. Live Filters keep filters editable on a layer, with an optional filter mask; the stack can be switched off, its mask disabled or the stack cleared.
  • Type: point and paragraph text edited on the canvas, Character and Paragraph panels, character and paragraph styles saved with the document, a Glyphs panel, OpenType features where the font has them (ligatures, contextual, stylistic, titling and justification alternates, swashes, ornaments, small capitals, lining or oldstyle and proportional or tabular figures, slashed zero, superscript and subscript forms, ordinals, fractions, and stylistic sets listed by the names the font gives them), right-to-left and mixed-direction text with digit shapes, vertical text with upright or sideways Latin and short runs (dates, numbers) set horizontally in one cell, find and replace, spell checking (English), warp text, type on a path (work paths, saved paths and shape outlines; start and end markers and flipping with the path selection tools) and area type inside closed paths with an inset, Convert to Arc Text (arch, circle, bow and wave shapes adjustable afterward, and block text that scales every line to one width), type masks, convert to shape, Match Font (box text in the image; it is straightened and its letter shapes are compared with every available font, best matches shown with your text and applied to the selected text layer, with an optional AI opinion through Puter), and five bundled open-source fonts plus optional local fonts.
  • Shapes and paths: rectangle, ellipse, triangle, polygon, line and custom shape tools with live parameters; pen, freeform, curvature and anchor tools; path and anchor selection; a paths panel (fill, stroke, load as selection, make a path from a selection).
  • Transforms and canvas: on-canvas transforms with scale, rotate, skew, distort, perspective and warp (15 presets, custom grids and warps split into several patches with smooth or corner anchors, plus optional thirds guides), repeating the last transform, exact 90° rotations and flips, crop with rotation, straighten and overlays, perspective crop, image resizing with seven resampling methods, Upscale (edge-directed enlargement of every layer, mask and channel, offline, with an optional generative AI layer on top), canvas resizing with anchors, trimming, and expanding the canvas to show all content. Canvas edits carry everything placed in document coordinates (guides, paths, vector masks, annotations, slices, artboards, layer comp positions, variable placements, frame offsets and Live Filters); resizing scales layer effects, and changing the resolution keeps type the same size in pixels.
  • Measurement and annotation: up to ten color samplers with live readouts (before/after values while a change is previewed) in a choice of color models, a ruler with a protractor that can straighten a layer or the whole image, numbered counts in named groups, notes (also imported from JSON or text files), a measurement scale with presets, recorded measurements of selections (area, perimeter, circularity, gray values), ruler lines and counts in a sortable Measurement Log with CSV export, and a placed scale marker. The Info panel shows the pointer color, position and sizes in the chosen ruler units, and document status. Samplers, counts, notes and the scale are saved in .photo projects.
  • Animation: a Timeline panel docked under the canvas (Window → Timeline) for frame animation. Each frame keeps its own layer visibility, position, opacity, fill, blend mode and layer style while pixel edits apply to every frame (or unify position, visibility or style across frames); per-frame delays, looping, playback, multi-frame selection and drag reordering, tweening of position, opacity and effects, reversing, frames from layers, flattening frames into layers, and onion skins on the canvas. Video filters: De-Interlace and Broadcast-Safe Colors.
  • Video: a document can use a video timeline instead of frames (converting either way): a time ruler with the current-time indicator, zoom and a work area, a track per layer whose clip drags to move, trims at either end and splits at the playhead, position, opacity and layer style keyframes with stopwatches and linear or hold interpolation, fade, fade-with-color and cross-fade transitions, real-time playback at the timeline frame rate, onion skins, and duration and frame rate settings. Video layers come from files (WebM decoded frame-accurately with WebCodecs, other formats the browser plays by seeking; frames decode on demand into a memory-bounded cache) or start blank; painting, filters and adjustments change the frame shown, and altered frames are saved in the project. Canvas edits (Image Size, Upscale, Canvas Size, crops, rotations and flips, mode conversions) and layer transforms (Free Transform, flips, Transform Again, moves) apply to every frame through the layer's placement, which is resampled once per displayed frame. Frames can be inserted, duplicated, deleted, restored and reloaded, footage replaced or interpreted (frame rate, alpha, looping) and video layers rasterized. Audio tracks sit under the video tracks: clips from sound files (WAV, MP3, AAC, Ogg, Opus, FLAC or anything else the browser decodes) and the sound of footage, linked to its video clip (moving or trimming either moves or trims both; unlink to move it on its own; mute it on the video layer). Audio clips draw their waveform, move (also to another track), trim at either end, split at the playhead, duplicate and delete, snap to the playhead and clip edges, and have a gain and fade in/out handles; tracks can be added, renamed, deleted, muted, soloed and given a volume. Playback plays the mix in step with the pictures (the sound's clock drives the frame shown, with optional audio scrubbing), and Render Video mixes the sound offline into the WebM as an Opus track or writes it alone as a WAV file.
  • Multi-image: auto-align layers (automatic, perspective, cylindrical or reposition-only projections) and auto-blend them into panoramas (seams that follow matching content, with seamless tone correction) or focus stacks, keeping each layer editable through masks; Panorama and Merge to HDR (32-bit or tone mapped) from files or open documents; HDR Toning with local adaptation and a toning curve; Apply Image and Calculations across layers, channels and open documents; Sky Replacement with generated skies or your own image.
  • Warps: Pin Warp bends a layer with pins on an as-rigid-as-possible mesh (rigid, normal and distort modes, mesh density and expansion, pin rotation and depth; the mesh and pins can be hidden from View → Show) and stays editable on embedded objects, re-rendered when their contents change; Perspective Warp lays out joined planes and then changes their perspective (kept as an editable warp on embedded objects), with automatic straightening of near-vertical and near-horizontal edges; Context Scale resizes by seam carving, protecting detailed areas, skin tones or a saved selection, blended with ordinary scaling by an amount.
  • Automation: recorded actions replay commands with their settings, and batch processing runs actions and format conversions over many files. File → Automate also offers Crop and Straighten Photos, Contact Sheet, Fit Image, Conditional Mode Change, PDF Presentation, Lens Correction for many photos (automatic straightening and vignette removal measured per photo, or custom settings) and Create Batch Link (a bookmarkable link that opens Photo Studio ready to run an action on dropped photos). Scripts in plain JavaScript drive documents, layers, pixels, text, selections and any command through a documented API (docs/scripting.md); they run in a sandbox without access to the page, storage or network, each run is one undo step, and they are installed, edited (built-in editor with highlighting), assigned shortcuts and listed under File → Scripts from the Scripts panel, with six sample scripts. The Script Events Manager runs scripts or actions when the app starts or documents are created, opened, saved, exported or closed; Statistics combines images into an embedded object with a stack mode. History snapshots are supported. Variables bind layers to data (visibility, text replacement and pixel replacement with fit/fill/as-is/conform placement); data sets are edited in a table with a live preview, imported from CSV or tab-separated files, applied, and exported as one PNG, JPEG, PSD or .photo file per set.
  • Collaboration and review: comments pinned to a point or a dragged region (Comment tool, I, and the Comments panel) with replies, @mentions, resolve and reopen, filters (open, resolved, mine, all), click-to-zoom pins that never appear in exports, saved in .photo projects. File → Invite to Edit shares a document for live editing with other Puter users: a collaboration server is deployed to the owner's Puter account, edits merge (different layers and properties merge, painting merges per 256-pixel tile), each person undoes only their own steps, cursors, active layers, selections and tools of others show on the canvas, avatars and a status chip (connected, syncing, offline with pending changes) sit in the top bar, anyone can follow another person's view, and changes made offline are kept and sent later. The owner invites by link or Puter username as editor, commenter or viewer, with expiring links, access expiry, role changes and removal, all enforced by the server. File → Share for Review creates a link that opens a review view (zoom and pan, artboards, layer comps, comments) without editing tools. See docs/collaboration.md.

Files

  • Open: PSD and PSB (8, 16 and 32-bit RGB), TIFF (including BigTIFF, tiled, 16-bit and float), PNG (animated PNG as frames), JPEG, WebP, AVIF, GIF (first frame, frames as layers or a frame animation), BMP, ICO/CUR, TGA, Netpbm and SVG, plus native .photo projects. Embedded ICC profiles and resolution are kept. Import Layers adds every layer of a PSD/PSB or .photo file (local or Puter) as a group. Any of these can also be opened or placed as an embedded object, placed as a linked file (local or Puter), or loaded as a stack of layers.
  • New documents: File → New offers Photo, Print, Art & Illustration, Web, Mobile and Film & Video presets, recently used and saved presets, and settings for units (including columns), orientation, artboards, resolution, color mode, background, color profile and pixel aspect ratio. The start screen creates a document from common presets in one click, takes a described edit (with an optional image) for the Assistant, and lists recent documents with thumbnails; local files reopen after a reload.
  • Import: File → Import → Images from Device captures photos from a camera (camera and resolution choice, mirroring, a 3/5/10-second timer and bursts of 3–10 shots) into a new document, one layer per shot, or as embedded objects in the current document; Import → Notes adds notes from JSON or text files.
  • Versions and recovery: Version History (File menu and panel) keeps versions in this browser on each save, at the autosave interval and with Save Version; versions can be previewed on the canvas, restored as a history step, opened as a copy or deleted. Unsaved documents are kept in browser storage at the recovery interval and offered again after a crash or a closed tab.
  • Save and export: native .photo projects (locally or to Puter); File → Package as ZIP (the project plus its linked files); export with live preview for PNG, JPEG, WebP, AVIF (where the browser can encode it), GIF, TIFF, BMP, TGA, ICO and SVG; quick export (format and location set in Preferences); animated GIF, PNG and WebP from the Timeline; Render Video of the frame animation or video timeline to WebM with the timeline's mixed sound (WebCodecs, or real-time recording where unavailable), to a PNG image sequence in a ZIP, or the sound alone to WAV; Import → Video Frames to Layers and Variable Data Sets; Export → Data Sets as Files; export layers, artboards or layer comps to files (ZIP) or, for artboards and comps, to PDF; Export for Web with slices; color lookup tables (.cube, .3dl or .csp, 17–65 points) baked from the visible adjustment layers; layered PSD; CMYK, grayscale and Lab TIFF; print; saved and work paths as SVG (Export → Paths to Vector File).
  • Image Assets: File → Generate → Image Assets writes layers and groups named like files (logo.png, 200% hero.jpg80, thumbs/hero.webp, 48x48 icon.png8, icons/close.svg) as image files after each edit — into a <document>-assets folder beside a Puter document, or as a ZIP (Download Image Assets). Sizes can be percentages, factors, exact or one-sided pixel sizes, or physical units. A default 2x hd/, 1x layer adds size variants, and bad names are listed on the status bar with their layer (docs/image-assets.md).
  • Provenance: each document keeps a record of how it was made — files opened and placed (with a SHA-256 of their bytes), the edit steps with the commands that made them, AI commands (prompts only when Preferences → Export → Record AI prompts is on) and exports — shown as a timeline in the Provenance panel and saved in .photo projects. Export As and Quick Export can attach it to PNG, JPEG, WebP and TIFF files as an XMP packet with a compact JSON-LD manifest and a SHA-256 of the pixel data, optionally with a C2PA-format manifest store (PNG caBX, JPEG APP11) signed with a key made in this browser and clearly marked self-signed. File → Inspect Provenance reads any image's record and manifest, checks the signature and hashes, and says whether the pixels still match.
  • PSD interchange: pixel layers, groups (including pass-through), artboards, names, visibility, opacity, all blend modes, locks, layer masks, clipping, editable text, editable shape layers, supported adjustment layers and Blend If ranges, channel restrictions and knockout round-trip (deep knockout is written as shallow). Frames export as their masked pixels, path text and area text as their pixels; layer comps, slices, variables and data sets are kept in .photo projects only. Text on a path in a PSD opens editable when its curve can be read, otherwise as pixels. Layer styles and fill layers are rasterized on export; unsupported constructs on import open as the file's saved composite with a notice, and the original file is retained in .photo projects so an unchanged document can be exported intact. See the PSD audit notes.

Color

ICC profiles (matrix/TRC and LUT-based, v2 and v4) for display and conversion, assigning and converting profiles, color settings with working spaces and policies, document modes (RGB, Grayscale, CMYK, Lab, Indexed, Bitmap, Duotone, and Multichannel with separate ink channels shown overprinted), soft proofing (including individual CMYK plates, standard web RGB and legacy gamma 1.8 RGB displays, and protan/deutan color-vision simulations) and gamut warning, trapping for CMYK output, and 8/16/32-bit documents with 32-bit preview options (exposure and gamma, highlight compression or a filmic curve) that change only the display. CMYK output uses original generic coated and uncoated profiles generated in code; they are approximations, not certified press characterizations. Details and trade-offs: docs/color-management.md.

Architecture

Area Location Notes
Workspace src/app/ Command, tool and panel registries; menus, toolbar, dock, input, icons
Orchestrator src/editor.ts Open documents (sessions), history, update loop, view
Features src/features/ Each feature registers its commands, tools, panels and overlays
Document model src/model/ Immutable document snapshots, tiles, selections, PSD codec, serialization
Imaging src/imaging/ Pure algorithms: filters, adjustments, retouching, segmentation, codecs, effects, gradients, text
Color src/color/ ICC parsing, transforms, built-in profiles, modes, proofing
Painting engine src/engine/paint.ts Dab-based strokes into copy-on-write tiles
GPU compositor src/renderer/ WebGPU and WebGL2 backends with matching shaders

Destructive pixel content is stored as 256 px immutable tiles shared between history states, so an edit allocates only the tiles it touches and undo is a reference swap. The compositor uploads only changed tiles. Heavy operations (filters, adjustments, Context Fill, segmentation, layer styles, encoding) run in Web Workers. Menus, tools and panels register at startup while dialogs, workspaces, codecs, filters and tool implementations load on first use (prefetched when idle), which keeps the startup bundle near half its former size (docs/performance.md). See docs/architecture.md for contributor details.

Limitations

  • Pixel layers are 8 bits per channel. 16 and 32-bit documents are supported for imported PSD/TIFF/PNG sources and compositing; destructive tools convert content to 8-bit pixel layers.
  • Documents are limited to 8192 pixels per side and 24 megapixels. New documents are 8 bits per channel.
  • Versions, recovery data and recent local files live in this browser's storage (IndexedDB); Puter.js offers no file version API, so Puter files list the same local versions. Clearing site data removes them.
  • Document modes other than RGB are enforced at conversion time; later edits in RGB blend modes can leave the mode's gamut until converted again.
  • Automatic subject selection and background removal use classic (non-neural) segmentation and work best when the subject differs clearly from a background touching the image border.
  • The Assistant requires a Puter account and plans only with menu commands and its own operations: it cannot paint or drag with tools, commands without recordable settings open their dialog during the run, and plans are limited to 30 steps.
  • Portrait & Restore finds skin by color and region shape and estimates depth from classic cues (position, haze, focus, the main subject), so unusual lighting, skin-colored backgrounds or flat scenes may need the selection-only skin mode or a depth layer. Its AI options (AI colors, AI style, Scene Changer) are generative re-renderings at about one megapixel, blended over the original, and cannot be kept in a Live Filter.
  • AI Fill, AI Expand, Generate Image and Edit with Prompt require a Puter account; results are limited to about one megapixel by the service (Edit with Prompt sends at most 1024 pixels on the longer side). The AI layer of Upscale is a generative re-rendering, capped near 4K pixels; the offline Enhanced Upscale is always applied first.
  • Mask All Objects uses the same classic segmentation as subject selection: it separates objects that stand out from a background reaching the image border, and keeps touching objects of similar color together. Reflection removal is not offered; no classical single-image method gave dependable results.
  • Frame animations and video timelines are saved in .photo projects; PSD export writes the frame or time currently shown. Animated WebP export needs a browser that encodes WebP images, and video import reads only formats the browser can play. The sound of footage plays at its own speed from the clip's place in the footage: interpreting the frame rate, looping, and inserting or deleting frames of a video layer change its pictures only. Audio clips have no keyframed volume, start within the first four hours of the timeline and number at most 2,000 (in up to 32 tracks); surround sound is folded down to stereo; and PSD export ignores audio (the tracks are kept in .photo projects). Where WebCodecs cannot encode Opus, Render Video records in real time and keeps the sound in step only as far as the browser's recorder allows. Warps do not apply to video layers (rasterize them first) and Live Filters are not offered on them, and artboards cannot be used in a document with a video timeline.
  • OpenType features apply to the bundled fonts only; Convert to Shape ignores them (one glyph per character), and right-to-left text in shapes is not shaped. Text on a path is drawn glyph by glyph, so ligatures do not form along a path; warp does not apply to path or area text, which is horizontal only. Text styles, OpenType features and paragraph direction are not written to PSD (the text keeps its appearance attributes).
  • Vector masks are kept as editable paths in .photo projects but rendered through the layer mask and not yet written to PSD.
  • Knockout applies to the layer's shape without its effects, and PSD stores deep knockout as shallow. Clarity & Dehaze and Grain layers have no PSD equivalent (the merged image keeps their effect).
  • Provenance signatures use a self-signed key made in each browser: they show that a file is unchanged since that key signed it, not who made it. Inspect Provenance checks no trust list or certificate chain for any file, so a matching signature never identifies the signer, whatever the certificate names. It reads only assertions the claim signed (others are reported as unsigned), checks the hard binding of the active manifest only and data hashes only (BMFF and box hashes are reported as not checked), and checks ES256, ES384, ES512, PS256–PS512 and Ed25519 signatures where the browser's WebCrypto provides them. C2PA-format manifests are written to PNG and JPEG only and have been checked with the app's own reader, not an external validator.
  • Multichannel ink channels cannot be painted; convert back to RGB, Grayscale, CMYK or Lab to edit pixels.
  • Shared documents need Puter accounts for everyone, reviewers included (an unauthenticated review link could not be checked by the server). Concurrent painting in the same 256-pixel tile keeps one person's version of that tile, and concurrent edits of one text layer's text keep one version. Starting to share clears the tab's earlier Undo steps; comment pins do not follow crops or canvas resizes; @mentions are not delivered as notifications. Large rooms and real-network behavior have been tested with simulated participants only.

Verification

npm test            # unit tests (vitest)
npm run test:rust   # Rust Wasm engine tests
npm run test:browser
npx playwright test -c playwright.production.config.ts # production unload guards
npm run build       # also bundles the room worker (npm run build:worker)

tests/browser/smoke-all.spec.ts runs every command, tool and panel in an empty workspace and with a document (about five minutes, SMOKE_TIMEOUT raises the limit on slow machines; SMOKE_ONLY=<regex> and SMOKE_VERBOSE=1 help when debugging). Timing-budget tests are opt-in through environment variables (CODECS_PERF, FILTERS_PERF, ADJUST_PERF, RETOUCH_BENCH, and PHOTO_PERF for the browser interaction budgets) because shared machines make them flaky. Browser tests use installed Google Chrome; set PHOTO_EDITOR_TEST_PORT to choose the dev-server port.

Rebuild the Wasm engine after editing Rust:

rustup toolchain install 1.85.1 --profile minimal --target wasm32-unknown-unknown
npm run wasm:build

Legal notes

  • Photo Studio's code, icons, cursors, presets (brushes, gradients, patterns, styles, shapes, color looks) and branding are original or come from permissively licensed projects listed in docs/third-party.md and public/THIRD_PARTY_NOTICES.txt.
  • Features use plain, descriptive names.
  • PSD/PSB support is implemented for interoperability with the MIT-licensed ag-psd library and published format documentation.
  • Photo Studio is an independent project. It is not affiliated with, endorsed by, or sponsored by Adobe. Adobe and Photoshop are trademarks of Adobe Inc.
  • This summary is not a legal review.

Puter references

License

This app, including all its contents, modules, and components, is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only). Third-party libraries included in this app may be subject to their own licenses.