mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-03 04:54:26 +00:00
Extensions read YAPF 2; Nix package
- KDE thumbnailer: texture loader, decodes only the mip it needs; GPU blocks, 16-bit and float via the new yapf_tex_to_rgba8. Tested through KDE's plugin loader with KF6 from nixpkgs. - Photoshop: shows the tool's error message; HDR textures open as 32-bit (.hdr), 16-bit stays 16-bit; 16-bit documents save as 16-bit. - CLI: 16-bit PNG export, readable conversion errors. - default.nix: yapf tool, library, header, MIME type and thumbnailer (absolute store path); runs the test suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVrVthWN8GsmgHGUhhsCYm
This commit is contained in:
parent
83588d8e2a
commit
a6c032d824
13 changed files with 336 additions and 48 deletions
10
yapf.h
10
yapf.h
|
|
@ -601,6 +601,16 @@ int yapf_tex_compress(const yapf_texture_t *src, uint8_t format,
|
|||
int yapf_blocks_decode(uint8_t format, const void *blocks, uint32_t w, uint32_t h,
|
||||
void *out);
|
||||
|
||||
/*
|
||||
* yapf_tex_to_rgba8 — one slice of a decoded surface as 8-bit RGBA for
|
||||
* display (thumbnails, previews): gray is expanded, 16-bit is rounded to
|
||||
* 8 bits, float and half are clamped to 0..1 and sRGB encoded (they are
|
||||
* linear), GPU blocks are decoded. out holds w × h × 4 bytes of that
|
||||
* mip. Returns YAPF_ERR_UNSUPPORTED for ETC2 / EAC / ASTC blocks.
|
||||
*/
|
||||
int yapf_tex_to_rgba8(const yapf_texture_t *tex, uint32_t surface, uint32_t slice,
|
||||
uint8_t *out);
|
||||
|
||||
/* yapf-sum, the checksum used by version 2 files. */
|
||||
uint32_t yapf_checksum(const void *data, size_t size);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue