summaryrefslogtreecommitdiff
path: root/test/lua/error.lua
blob: f8c71a8e557765592d648e04c3656f621dbcbf90 (plain)
1
2
3
4
5
6
7
8
9
10
require"imlua"

local filename = "lena.jpg"
local image = im.FileImageLoad(filename)
local image2 = im.ImageCreate(image:Width(), image:Height(), im.GRAY, im.USHORT)

-- Both calls will signal an error because of incompatible parameters

--im.ConvertDataType(image, image2, im.CPX_REAL, im.GAMMA_LINEAR, 0, im.CAST_MINMAX)
im.ConvertColorSpace(image, image2, im.CPX_REAL, im.GAMMA_LINEAR, 0, im.CAST_MINMAX)