238{
239 if(img->numcomps < 3)
240 {
241 img->color_space = OPJ_CLRSPC_GRAY;
242 return;
243 }
244
245 if((img->comps[0].dx == 1)
246 && (img->comps[1].dx == 2)
247 && (img->comps[2].dx == 2)
248 && (img->comps[0].dy == 1)
249 && (img->comps[1].dy == 2)
250 && (img->comps[2].dy == 2))
251 {
253 }
254 else {
255 if((img->comps[0].dx == 1)
256 && (img->comps[1].dx == 2)
257 && (img->comps[2].dx == 2)
258 && (img->comps[0].dy == 1)
259 && (img->comps[1].dy == 1)
260 && (img->comps[2].dy == 1))
261 {
263 }
264 else {
265 if((img->comps[0].dx == 1)
266 && (img->comps[1].dx == 1)
267 && (img->comps[2].dx == 1)
268 && (img->comps[0].dy == 1)
269 && (img->comps[1].dy == 1)
270 && (img->comps[2].dy == 1))
271 {
273 }
274 else
275 {
276 fprintf(stderr,"%s:%d:color_sycc_to_rgb\n\tCAN NOT CONVERT\n",
277 __FILE__,__LINE__);
278 return;
279 }
280 }
281 }
282 img->color_space = OPJ_CLRSPC_SRGB;
283}
void sycc420_to_rgb(opj_image_t *img)
void sycc444_to_rgb(opj_image_t *img)
void sycc422_to_rgb(opj_image_t *img)