Nils Dagsson Moskopp
0272fa5ccd
Change scanline order names
...
The scanline order ”bottom-top” has been changed to ”bottom_top”.
The scanline order “top-bottom” has been changed to “top_bottom”.
The scanline order names were changed so that API consumers can check if
“tga_encoder.features.scanline_order.top_bottom” is truthy instead of
having to check “tga_encoder.features.scanline_order["top-bottom"]”.
This is a breaking change, but since no release of tga_encoder happened
since commit 01bcbbf927
which allowed the
scanline order to be specified, it can not affect any mod on ContentDB.
2023-11-28 21:41:54 +01:00
Nils Dagsson Moskopp
e599c9fe83
Use keys with truthy values in features table
...
If the features table uses keys with truthy values, it is easy to check
for the presence of some feature by checking if the corresponding table
entry (e.g. “tga_encoder.features.color_format.A1R5G5B5”) is truthy.
2023-11-27 23:07:06 +01:00
Nils Dagsson Moskopp
c0cc855a02
Refactor encoding of uncompressed A1R5G5B5 images
2023-10-18 05:08:16 +02:00
Nils Dagsson Moskopp
2b4faee266
Refactor encoding of compressed A1R5G5B5 images
2023-10-18 05:02:41 +02:00
Nils Dagsson Moskopp
619e49d3b7
Encode alpha channel for compressed A1R5G5B5 images
2023-10-18 02:12:48 +02:00
Nils Dagsson Moskopp
2e0471c81f
Encode alpha channel for uncompressed A1R5G5B5 images
2023-10-18 02:12:48 +02:00
Nils Dagsson Moskopp
48d94720c1
Add features table
2023-10-17 12:33:29 +02:00
Nils Dagsson Moskopp
01bcbbf927
Allow encoding with top-bottom scanline order
2023-10-16 21:15:40 +02:00
Nils Dagsson Moskopp
bb68ceb38d
Do not encode images with illegal colormap indexes
2023-09-22 20:06:21 +02:00
Nils Dagsson Moskopp
4dd3833f3b
Move encoding format heuristics from image:save() to image:encode()
2023-09-18 16:45:31 +02:00
Nils Dagsson Moskopp
685bdcb379
Allow encoding with B8G8R8A8 colormap
2022-05-19 18:26:41 +02:00
Nils Dagsson Moskopp
45e405982a
Allow encoding with A1R5G5B5 colormap
2022-05-16 18:48:18 +02:00
Nils Dagsson Moskopp
e83894fcfa
Treat empty colormap as no colormap
2022-05-16 17:56:53 +02:00
Nils Dagsson Moskopp
9f9b78eed9
Allow color-mapped encoding for RGB images
2022-05-16 17:28:16 +02:00
Nils Dagsson Moskopp
ed061e68ff
Allow RLE encoding for RGBA images
2022-05-16 13:16:23 +02:00
Nils Dagsson Moskopp
1f9c446a98
Assert that pixel data is encoded
2022-05-16 03:21:52 +02:00
Nils Dagsson Moskopp
7b94fc026d
Allow to specify color format
2022-05-16 02:48:51 +02:00
Nils Dagsson Moskopp
fa23775bf9
Measure pixel_depth in bits everywhere
2022-05-16 01:54:21 +02:00
Nils Dagsson Moskopp
36ee45ebe3
Add RGBA support (only RAW encoding)
2022-05-16 01:39:33 +02:00
Nils Dagsson Moskopp
2112637faf
Use HSP for RGB-to-BW8 conversion
2022-05-15 19:58:19 +02:00
Nils Dagsson Moskopp
5b79bc6fb7
Set default encoding to R8G8B8 RAW
...
This the most trivial RGB encoding the encoder supports. Setting
it prevents a crash related to BW8 only supporting RAW encoding.
2022-05-15 19:31:24 +02:00
Nils Dagsson Moskopp
759b0a188f
Allow saving R8G8B8 images as BW8
2022-05-15 19:23:26 +02:00
Nils Dagsson Moskopp
376b6404b2
Allow RAW or RLE encoding for true-color images
2022-05-15 15:56:18 +02:00
Nils Dagsson Moskopp
9bd1702d60
Encode image only when saving it to a file
2022-05-15 14:58:12 +02:00
Nils Dagsson Moskopp
25b7b30945
Allow encoding grayscale images as BW8
2022-05-14 22:41:52 +02:00
Nils Dagsson Moskopp
9af0719df8
Allow encoding RGB images as B8G8R8
2022-05-14 21:56:42 +02:00
Nils Dagsson Moskopp
1b48c3f539
Use raw packets in RLE compression in tga_encoder
2022-05-14 21:52:08 +02:00
Nils Dagsson Moskopp
13552f16f2
Reduce TGA filesize by 25% by using 16-bit colors
2022-05-14 21:52:07 +02:00
Nils Dagsson Moskopp
adb8e45d67
Fix TGA file writing on Windows
...
Before this patch, the tga_encoder mod would write corrupted TGA files
on Windows: Bytes that looked like newlines were replaced by a carriage
return and a newline.
2022-05-14 20:21:59 +02:00
Nils Dagsson Moskopp
3f60b5baa6
Speed up TGA encoding by creating fewer strings
2022-05-14 20:21:58 +02:00
Nils Dagsson Moskopp
52e5c955f0
Use RLE compression in tga_encoder
2022-05-14 20:21:58 +02:00
Lizzy Fleckenstein
b88579b52e
Add updated tga_encoder
2022-05-14 20:21:58 +02:00
Lizzy Fleckenstein
eaa4dc99d7
Initial import
2022-05-14 20:21:52 +02:00