|
Lines 227-234
KisImportExportErrorCode HeifImport::convert(KisDocument *document, QIODevice *i
Link Here
|
| 227 |
|
227 |
|
| 228 |
heif_color_profile_type profileType = heif_image_handle_get_color_profile_type(handle.get_raw_image_handle()); |
228 |
heif_color_profile_type profileType = heif_image_handle_get_color_profile_type(handle.get_raw_image_handle()); |
| 229 |
|
229 |
|
|
|
230 |
heif_colorspace reqModel; |
| 231 |
heif_chroma reqChroma; |
| 232 |
heif_image_handle_get_preferred_decoding_colorspace(handle.get_raw_image_handle(), &reqModel, &reqChroma); |
| 233 |
if (reqModel == heif_colorspace_YCbCr) { |
| 234 |
reqModel = heif_colorspace_RGB; |
| 235 |
reqChroma = heif_chroma_444; |
| 236 |
} |
| 237 |
else { |
| 238 |
reqModel = heif_colorspace_undefined; |
| 239 |
reqChroma = heif_chroma_undefined; |
| 240 |
} |
| 230 |
|
241 |
|
| 231 |
heif::Image heifimage = handle.decode_image(heif_colorspace_undefined, heif_chroma_undefined); |
242 |
heif::Image heifimage = handle.decode_image(reqModel, reqChroma); |
| 232 |
heif_colorspace heifModel = heifimage.get_colorspace(); |
243 |
heif_colorspace heifModel = heifimage.get_colorspace(); |
| 233 |
heif_chroma heifChroma = heifimage.get_chroma_format(); |
244 |
heif_chroma heifChroma = heifimage.get_chroma_format(); |
| 234 |
int luma = handle.get_luma_bits_per_pixel(); |
245 |
int luma = handle.get_luma_bits_per_pixel(); |