| 21 | using forge::common::getWindow; |
| 22 | |
| 23 | fg_err fg_create_image(fg_image* pImage, |
| 24 | const unsigned pWidth, const unsigned pHeight, |
| 25 | const fg_channel_format pFormat, const fg_dtype pType) |
| 26 | { |
| 27 | try { |
| 28 | ARG_ASSERT(1, (pWidth>0)); |
| 29 | ARG_ASSERT(2, (pHeight>0)); |
| 30 | |
| 31 | *pImage = getHandle(new common::Image(pWidth, pHeight, pFormat, (forge::dtype)pType)); |
| 32 | } |
| 33 | CATCHALL |
| 34 | |
| 35 | return FG_ERR_NONE; |
| 36 | } |
| 37 | |
| 38 | fg_err fg_retain_image(fg_image* pOut, fg_image pImage) |
| 39 | { |