mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 11:51:49 +09:00
better CRT/Composite shader
This commit is contained in:
@@ -2,26 +2,18 @@ if (!exec_args[1]) {
|
||||
printerrln("Usage: jpdectest image.jpg")
|
||||
}
|
||||
|
||||
filesystem.open("A", exec_args[1], "R")
|
||||
const fullFilePath = _G.shell.resolvePathInput(exec_args[1])
|
||||
const file = files.open(fullFilePath.full)
|
||||
const fileLen = file.size
|
||||
const infile = sys.malloc(file.size); file.pread(infile, fileLen, 0)
|
||||
|
||||
let status = com.getStatusCode(0)
|
||||
let infile = undefined
|
||||
if (0 != status) return status
|
||||
|
||||
|
||||
let fileLen = filesystem.getFileLen("A")
|
||||
println(`DMA reading ${fileLen} bytes from disk...`)
|
||||
infile = sys.malloc(fileLen)
|
||||
dma.comToRam(0, 0, infile, fileLen)
|
||||
|
||||
|
||||
println("decoding")
|
||||
//println("decoding")
|
||||
|
||||
// decode
|
||||
const [imgw, imgh, channels, imageData] = graphics.decodeImageResample(infile, fileLen, -1, -1)
|
||||
|
||||
println(`dim: ${imgw}x${imgh}`)
|
||||
println(`converting to displayable format...`)
|
||||
//println(`dim: ${imgw}x${imgh}`)
|
||||
//println(`converting to displayable format...`)
|
||||
|
||||
// convert colour
|
||||
graphics.setGraphicsMode(0)
|
||||
|
||||
@@ -2,26 +2,18 @@ if (!exec_args[1]) {
|
||||
printerrln("Usage: jpdectesthigh image.jpg")
|
||||
}
|
||||
|
||||
filesystem.open("A", exec_args[1], "R")
|
||||
const fullFilePath = _G.shell.resolvePathInput(exec_args[1])
|
||||
const file = files.open(fullFilePath.full)
|
||||
const fileLen = file.size
|
||||
const infile = sys.malloc(file.size); file.pread(infile, fileLen, 0)
|
||||
|
||||
let status = com.getStatusCode(0)
|
||||
let infile = undefined
|
||||
if (0 != status) return status
|
||||
|
||||
|
||||
let fileLen = filesystem.getFileLen("A")
|
||||
println(`DMA reading ${fileLen} bytes from disk...`)
|
||||
infile = sys.malloc(fileLen)
|
||||
dma.comToRam(0, 0, infile, fileLen)
|
||||
|
||||
|
||||
println("decoding")
|
||||
//println("decoding")
|
||||
|
||||
// decode
|
||||
const [imgw, imgh, channels, imageData] = graphics.decodeImageResample(infile, fileLen, -1, -1)
|
||||
|
||||
println(`dim: ${imgw}x${imgh}`)
|
||||
println(`converting to displayable format...`)
|
||||
//println(`dim: ${imgw}x${imgh}`)
|
||||
//println(`converting to displayable format...`)
|
||||
|
||||
// convert colour
|
||||
graphics.setGraphicsMode(4)
|
||||
|
||||
Reference in New Issue
Block a user