MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / getFIT

Function getFIT

src/api/c/imageio2.cpp:104–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104FREE_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

Callers 1

af_save_image_nativeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected