ws-tex: image/exr (read NONE/RLE/ZIPS/ZIP/PIZ, half/float/uint, scanline + tiled + multipart, mips; write NONE/ZIPS/ZIP)
Tested against the OpenEXR 3.5 python bindings, exrmaketiled (one level / mipmap / ripmap / round up), exrmultipart, a hand-written subsampled file; PXR24 / B44 / DWAA give UNSUPPORTED; our files read back by the bindings and exrheader. Broken / zeroed offset tables are rebuilt (exrmultipart writes them zeroed).
This commit is contained in:
1 parent
ef2cd93c88
commit
abd01270f0
11 files changed
+1661
No files matched your search
@@ -93,3 +93,18 @@ if which == "ktx" then
|
||||
cube.meta.layout = "array"
|
||||
emit("ours_array.ktx2", Ktx.encode(cube))
|
||||
end
|
||||
|
||||
if which == "exr" then
|
||||
local Exr = require("@formats/image/exr")
|
||||
local f = image(37, 23, "rgbaf32", 0, 4)
|
||||
for _, c in { "none", "zips", "zip" } do
|
||||
emit("ours_half_" .. c .. ".exr", Exr.encode(f, { compression = c :: any }))
|
||||
emit("ours_float_" .. c .. ".exr", Exr.encode(f, { compression = c :: any, pixelType = "float" }))
|
||||
end
|
||||
local opaque = image(20, 40, "rgbaf32", 1, 2)
|
||||
for i = 0, 20 * 40 - 1 do
|
||||
buffer.writef32(opaque.pixels, i * 16 + 12, 1)
|
||||
end
|
||||
emit("ours_rgb_zip.exr", Exr.encode(opaque))
|
||||
emit("ours_from_rgba8.exr", Exr.encode(image(16, 16, "rgba8", 2)))
|
||||
end
|
||||
Reference in new issue
Block a user