aboutsummaryrefslogtreecommitdiffstats
path: root/include/png.h
blob: ddd1b72c5e70037e66ef5fea3dd6ce92b7f9b8fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PNG decoding for the kitty graphics protocol.
 *
 * libghostty-vt ships no image codec: built as a library it sets its
 * `decode_png` hook to null, and a null hook means every `f=100` transmission
 * is rejected outright — no image stored, no placement, nothing for the
 * graphics layer to re-emit. A program that uploads a PNG (which is what a
 * program with a picture on disk naturally does) therefore drew nothing at
 * all, silently, while raw RGB worked. Installing this hook is the whole fix.
 *
 * PNG is the only format this can be about: the protocol has exactly three
 * (`f=24` RGB, `f=32` RGBA, `f=100` PNG) and the first two are raw pixels the
 * library already handles. Decoding only, never encoding — we hand the client
 * RGBA.
 */
#ifndef SLOSH_PNG_H
#define SLOSH_PNG_H

/* Install the process-global PNG decoder. Must be called before any terminal
 * exists, and is idempotent. */
void png_init(void);

#endif /* SLOSH_PNG_H */