| 102 | } |
| 103 | |
| 104 | FREE_IMAGE_TYPE getFIT(FI_CHANNELS channels, af_dtype type) { |
| 105 | if (channels == AFFI_GRAY) { |
| 106 | if (type == u8) { return FIT_BITMAP; } |
| 107 | if (type == u16) { |
| 108 | return FIT_UINT16; |
| 109 | } else if (type == f32) { |
| 110 | return FIT_FLOAT; |
| 111 | } |
| 112 | } else if (channels == AFFI_RGB) { |
| 113 | if (type == u8) { return FIT_BITMAP; } |
| 114 | if (type == u16) { |
| 115 | return FIT_RGB16; |
| 116 | } else if (type == f32) { |
| 117 | return FIT_RGBF; |
| 118 | } |
| 119 | } else if (channels == AFFI_RGBA) { |
| 120 | if (type == u8) { return FIT_BITMAP; } |
| 121 | if (type == u16) { |
| 122 | return FIT_RGBA16; |
| 123 | } else if (type == f32) { |
| 124 | return FIT_RGBAF; |
| 125 | } |
| 126 | } |
| 127 | return FIT_BITMAP; |
| 128 | } |
| 129 | |
| 130 | } // namespace |
| 131 |
no outgoing calls
no test coverage detected