summaryrefslogtreecommitdiff
path: root/test/lua/error.lua
diff options
context:
space:
mode:
authorscuri <scuri>2008-10-17 06:10:15 +0000
committerscuri <scuri>2008-10-17 06:10:15 +0000
commit5a422aba704c375a307a902bafe658342e209906 (patch)
tree5005011e086bb863d8fb587ad3319bbec59b2447 /test/lua/error.lua
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'test/lua/error.lua')
-rw-r--r--test/lua/error.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lua/error.lua b/test/lua/error.lua
new file mode 100644
index 0000000..f8c71a8
--- /dev/null
+++ b/test/lua/error.lua
@@ -0,0 +1,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)