mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-03 21:14:27 +00:00
Format (version 1, replaces the earlier experimental versions): - per-tile YCoCg-R or subtract-green colour transform, 8-bit modular - 12 row filters per 8-row band (Left, Gradient, Up-right, Up-average, Up 1-8 rows), none with more than a one-add serial dependency - residuals in groups of 8 at the group's width (w bits x 8 = w bytes), 4-bit control codes with repeat-previous-width runs chosen by DP - constant and stored tiles, independent 64x64 tiles, mips, GPU hints - all sizes validated before decoding; corrupt input is rejected Library: - SIMD on by default: SSSE3 (runtime CPUID check; GCC, Clang, MSVC, MinGW) and NEON on ARM64; -DYAPF_NO_SIMD for plain C - yapf_load_memory, yapf_load_mt, yapf_load_memory_mt - 6-10x faster decoding than PNG (stb_image) on one core; -O2 and -O3 builds perform the same - fixes for macOS (sysconf) and the Windows import library exports Tools and integrations: - `yapf` CLI: convert PNG/JPG/TGA/BMP/PSD/GIF <-> YAPF, info, bench, thumbnail, mips - JavaScript and Python bindings (byte-identical to the C encoder) - GIMP 3 plugin: exports the flattened image, optional mipmaps - Blender extension: import (also as plane), export, drag and drop - VS Code preview, Figma plugin, Photoshop scripts, Linux MIME type and thumbnailer - Makefile, updated build.sh / build.bat, tools/build_release.sh - tests/test_yapf.c (784 checks) and bindings/js/test.js Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.4 KiB
Markdown
33 lines
1.4 KiB
Markdown
# YAPF for Photoshop
|
|
|
|
Two scripts that appear under **File → Scripts**:
|
|
|
|
- **Open YAPF** — opens one or more `.yapf` files as documents.
|
|
- **Save as YAPF** — saves the visible image of the active document (a
|
|
flattened 8-bit copy; your document is not changed), keeping
|
|
transparency, with an optional mip chain.
|
|
|
|
They convert through the `yapf` command-line tool, so Photoshop needs no
|
|
native plugin.
|
|
|
|
## Install
|
|
|
|
1. Download `yapf-<your platform>.zip` from the
|
|
[Releases](https://github.com/Nexoniarz/YAPF/releases) (or build the tool:
|
|
`make` → `build/yapf`).
|
|
2. Copy `Open YAPF.jsx`, `Save as YAPF.jsx`, `yapf_common.jsxinc` **and**
|
|
`yapf` / `yapf.exe` into Photoshop's scripts folder:
|
|
- Windows: `C:\Program Files\Adobe\Adobe Photoshop <version>\Presets\Scripts`
|
|
- macOS: `/Applications/Adobe Photoshop <version>/Presets/Scripts`
|
|
3. Restart Photoshop. The scripts are under **File → Scripts**; you can give
|
|
them keyboard shortcuts in **Edit → Keyboard Shortcuts** or record them
|
|
in Actions.
|
|
|
|
Instead of copying `yapf` next to the scripts you can put it on your `PATH`.
|
|
|
|
## Status
|
|
|
|
The scripts are written for Photoshop CC's ExtendScript and are not yet
|
|
tested inside Photoshop (the converter itself is fully tested). A native
|
|
format plugin (`.8bi` / `.plugin`, so `.yapf` shows up directly in the Open
|
|
and Save dialogs) needs Adobe's Photoshop SDK and is planned.
|