mirror of
https://github.com/randy408/libspng
synced 2025-03-28 21:13:20 +00:00
docs: encoding indexed color images requires a palette [skip-ci]
This commit is contained in:
parent
957d1ec1c1
commit
2bd9bbe1bf
@ -56,6 +56,8 @@ Encodes the image from `img` in the source format `fmt` to the specified PNG for
|
||||
|
||||
The width, height, color type, bit depth and interlace method must be set with [spng_set_ihdr()](chunk.md#spng_set_ihdr).
|
||||
|
||||
If the color type is set to `SPNG_COLOR_TYPE_INDEXED` a palette must be set with [spng_set_plte()](chunk.md#spng_set_plte).
|
||||
|
||||
`img` must point to a buffer of length `len`, `len` must be equal to the expected image
|
||||
size for the given format `fmt`.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user