Compare commits
2 Commits
e87a8fc332
...
4d57ba62bf
Author | SHA1 | Date |
---|---|---|
Nils Dagsson Moskopp | 4d57ba62bf | |
Nils Dagsson Moskopp | 4064333b06 |
|
@ -1,5 +1,49 @@
|
|||
dofile("../init.lua")
|
||||
|
||||
local _ = { 0 }
|
||||
local R = { 1 }
|
||||
local G = { 2 }
|
||||
local B = { 3 }
|
||||
|
||||
local pixels_colormapped = {
|
||||
{ _, _, _, _, _, B, _, B, },
|
||||
{ _, _, _, _, _, B, B, B, },
|
||||
{ _, _, G, G, G, B, _, B, },
|
||||
{ _, _, G, _, G, B, B, B, },
|
||||
{ _, R, G, _, _, _, _, _, },
|
||||
{ _, R, G, G, G, _, _, _, },
|
||||
{ _, R, _, _, _, _, _, _, },
|
||||
{ R, R, R, _, _, _, _, _, },
|
||||
}
|
||||
|
||||
image_colormapped = tga_encoder.image(pixels_colormapped)
|
||||
|
||||
colormap_32bpp = {
|
||||
{ 0, 0, 0, 128 },
|
||||
{ 255, 0, 0, 255 },
|
||||
{ 0, 255, 0, 255 },
|
||||
{ 0, 0, 255, 255 },
|
||||
}
|
||||
image_colormapped:save(
|
||||
"type1_32bpp_bt.tga",
|
||||
{ colormap = colormap_32bpp, color_format = "B8G8R8A8" }
|
||||
)
|
||||
image_colormapped:save(
|
||||
"type1_16bpp_bt.tga",
|
||||
{ colormap = colormap_32bpp, color_format = "A1R5G5B5" }
|
||||
)
|
||||
|
||||
colormap_24bpp = {
|
||||
{ 0, 0, 0 },
|
||||
{ 255, 0, 0 },
|
||||
{ 0, 255, 0 },
|
||||
{ 0, 0, 255 },
|
||||
}
|
||||
image_colormapped:save(
|
||||
"type1_24bpp_bt.tga",
|
||||
{ colormap = colormap_32bpp, color_format = "B8G8R8" }
|
||||
)
|
||||
|
||||
local _ = { 0, 0, 0, 128 }
|
||||
local R = { 255, 0, 0, 255 }
|
||||
local G = { 0, 255, 0, 255 }
|
||||
|
@ -19,11 +63,11 @@ local pixels_rgba = {
|
|||
image_rgba = tga_encoder.image(pixels_rgba)
|
||||
|
||||
image_rgba:save(
|
||||
"type2_32bpp_bt_raw.tga",
|
||||
"type2_32bpp_bt.tga",
|
||||
{ color_format="B8G8R8A8", compression="RAW" }
|
||||
)
|
||||
image_rgba:save(
|
||||
"type2_32bpp_bt_rle.tga",
|
||||
"type10_32bpp_bt.tga",
|
||||
{ color_format="B8G8R8A8", compression="RLE" }
|
||||
)
|
||||
|
||||
|
@ -46,19 +90,19 @@ local pixels_rgb = {
|
|||
image_rgb = tga_encoder.image(pixels_rgb)
|
||||
|
||||
image_rgb:save(
|
||||
"type2_24bpp_bt_raw.tga",
|
||||
"type2_24bpp_bt.tga",
|
||||
{ color_format="B8G8R8", compression="RAW" }
|
||||
)
|
||||
image_rgb:save(
|
||||
"type2_24bpp_bt_rle.tga",
|
||||
"type10_24bpp_bt.tga",
|
||||
{ color_format="B8G8R8", compression="RLE" }
|
||||
)
|
||||
|
||||
image_rgb:save(
|
||||
"type2_16bpp_bt_raw.tga",
|
||||
"type2_16bpp_bt.tga",
|
||||
{ color_format="A1R5G5B5", compression="RAW" }
|
||||
)
|
||||
image_rgb:save(
|
||||
"type2_16bpp_bt_rle.tga",
|
||||
"type10_16bpp_bt.tga",
|
||||
{ color_format="A1R5G5B5", compression="RLE" }
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue