static bool find_first_supported_colorspace_cb( image_util_colorspace_e colorspace, void * user_data)
{
- int ret = image_util_decode_jpeg(img_path1, colorspace, &raw_image.buffer,
- &raw_image.w, &raw_image.h, &raw_image.size);
- if(IMAGE_UTIL_ERROR_NONE == ret){
- *(int*)user_data = colorspace;
- return false;
- }
- return true;
+ SUPPORTED_COLORSPACE = colorspace;
+ return false;
}
/**
fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
}
- ret = image_util_foreach_supported_jpeg_colorspace(
- find_first_supported_colorspace_cb , (void*)(&SUPPORTED_COLORSPACE) );
+ ret = image_util_foreach_supported_jpeg_colorspace(find_first_supported_colorspace_cb , NULL);
if (IMAGE_UTIL_ERROR_NONE != ret) {
_is_broken = true;
return;