| 98 | //------------------------------------------------------------------------------ |
| 99 | |
| 100 | static gdImagePtr openImageFile(const boost::filesystem::path& filename) |
| 101 | { |
| 102 | gdImagePtr image = nullptr; |
| 103 | |
| 104 | FILE* file = fopen(filename.c_str(), "rb"); |
| 105 | |
| 106 | if (file != nullptr) { |
| 107 | image = gdImageCreateFromPng(file); |
| 108 | |
| 109 | fclose(file); |
| 110 | file = nullptr; |
| 111 | } |
| 112 | |
| 113 | return image; |
| 114 | } |
| 115 | |
| 116 | //------------------------------------------------------------------------------ |
| 117 |