gpu: reading image will return its actual channel count and mov encoder will actually use it

This commit is contained in:
minjaesong
2022-05-06 10:52:07 +09:00
parent 7aee0d8a52
commit 9df0f9ddba
8 changed files with 183 additions and 17 deletions

View File

@@ -101,7 +101,7 @@ infile = sys.malloc(fileLen)
dma.comToRam(0, 0, infile, fileLen)
// decode
const [imgw, imgh, imageData, channels] = graphics.decodeImage(infile, fileLen) // stored as [R | G | B | (A)]
const [imgw, imgh, channels, imageData] = graphics.decodeImage(infile, fileLen) // stored as [R | G | B | (A)]
sys.free(infile)
let hasAlpha = (4 == channels) && configUseAlpha
let outBlock = sys.malloc(64)