Re: Loading A Graphic Using CxImage From User Input
- Posted by ghaberek (admin) Jun 23, 2009
- 1320 views
Andy said...
Ah, I used your code, but it still crahses. However the error says that there is a type_check failure. image type is {71,114,97,112...}
I am using a supported image type, so what is up?
Your GraphicType value needs to be one of these constants, from CxImage.ew:
-- Image types. Used with CXI_LoadImage and CXI_SaveImage. global constant CXI_FORMAT_UNKNOWN = 0, CXI_FORMAT_BMP = 1, CXI_FORMAT_GIF = 2, CXI_FORMAT_JPG = 3, CXI_FORMAT_PNG = 4, CXI_FORMAT_ICO = 5, CXI_FORMAT_TGA = 6, CXI_FORMAT_PCX = 7
I suspect you're passing it a sequence of "Grap..." something. (At least that's what your error message seems to indicate.)
-Greg