From what I can tell from the documentation, CreateImage has no error result if the image creation fails (e.g. not enough memory). For reliable error catching I would like to see this added.
For example, the function can return -1 on an error.
[Implemented] Error result for CreateImage()
- Arctic Fox
- Enthusiast
- Posts: 609
- Joined: Sun Dec 21, 2008 5:02 pm
- Location: Aarhus, Denmark
Re: Error result for CreateImage()
I think the docs just need that added. It returns 0 if no image can be created:
However, I also notice that the debugger returns a runtime error if width or
height is >32000 pixels, which is in contradiction to the docs which state the
max is 8192 for width and height:
Code: Select all
Debug CreateImage(0,9999,9999) ; Returns 0
height is >32000 pixels, which is in contradiction to the docs which state the
max is 8192 for width and height:
Code: Select all
Debug CreateImage(0,99999,99999) ; Compiler message about >32000 pixels
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.