32 const char *valueAsString =
"";
33 if (json_object_get_type(js) == json_type_string)
34 valueAsString = json_object_get_string(js);
38 if (! strcmp(valueAsString,
"PNG")) {
39 value = VuoImageFormat_PNG;
40 }
else if (! strcmp(valueAsString,
"JPEG")) {
41 value = VuoImageFormat_JPEG;
42 }
else if (! strcmp(valueAsString,
"TIFF")) {
43 value = VuoImageFormat_TIFF;
44 }
else if (! strcmp(valueAsString,
"BMP")) {
45 value = VuoImageFormat_BMP;
46 }
else if (! strcmp(valueAsString,
"HDR")) {
47 value = VuoImageFormat_HDR;
48 }
else if (! strcmp(valueAsString,
"EXR")) {
49 value = VuoImageFormat_EXR;
50 }
else if (! strcmp(valueAsString,
"GIF")) {
51 value = VuoImageFormat_GIF;
52 }
else if (! strcmp(valueAsString,
"TARGA")) {
53 value = VuoImageFormat_TARGA;
55 else if (! strcmp(valueAsString,
"WEBP"))
56 value = VuoImageFormat_WEBP;
167 struct json_object *js = json_object_new_array();
169 if (format == VuoImageFormat_PNG)
170 json_object_array_add(js, json_object_new_string(
"png"));
171 else if (format == VuoImageFormat_JPEG)
173 json_object_array_add(js, json_object_new_string(
"jpg"));
174 json_object_array_add(js, json_object_new_string(
"jpeg"));
176 else if (format == VuoImageFormat_TIFF)
178 json_object_array_add(js, json_object_new_string(
"tif"));
179 json_object_array_add(js, json_object_new_string(
"tiff"));
181 else if (format == VuoImageFormat_BMP)
182 json_object_array_add(js, json_object_new_string(
"bmp"));
183 else if (format == VuoImageFormat_HDR)
184 json_object_array_add(js, json_object_new_string(
"hdr"));
185 else if (format == VuoImageFormat_EXR)
186 json_object_array_add(js, json_object_new_string(
"exr"));
187 else if (format == VuoImageFormat_GIF)
188 json_object_array_add(js, json_object_new_string(
"gif"));
189 else if (format == VuoImageFormat_TARGA)
191 json_object_array_add(js, json_object_new_string(
"tga"));
192 json_object_array_add(js, json_object_new_string(
"targa"));
194 else if (format == VuoImageFormat_WEBP)
195 json_object_array_add(js, json_object_new_string(
"webp"));