@@ -337,6 +337,8 @@ JpgInput::open(const std::string& name, ImageSpec& newspec)
337337 if (m_spec.find_attribute (" hdrgm:Version" ))
338338 m_is_uhdr = read_uhdr (m_io);
339339
340+ std::cout << " INVESTIGATE: m_is_uhdr=" << m_is_uhdr << std::endl;
341+
340342 newspec = m_spec;
341343 return true ;
342344}
@@ -418,13 +420,18 @@ bool
418420JpgInput::read_uhdr (Filesystem::IOProxy* ioproxy)
419421{
420422#if defined(USE_UHDR)
423+ std::cout << " INVESTIGATE: read_uhdr main content" << std::endl;
421424 // Read entire file content into buffer.
422425 const size_t buffer_size = ioproxy->size ();
423426 std::vector<unsigned char > buffer (buffer_size);
424427 ioproxy->pread (buffer.data (), buffer_size, 0 );
425428
429+ std::cout << " INVESTIGATE: proxytype=" << ioproxy->proxytype () << std::endl;
430+ std::cout << " INVESTIGATE: proxytype=" << buffer_size << std::endl;
431+
426432 // Check if this is an actual Ultra HDR image.
427433 const bool detect_uhdr = is_uhdr_image (buffer.data (), buffer.size ());
434+ std::cout << " INVESTIGATE: detect_uhdr=" << detect_uhdr << std::endl;
428435 if (!detect_uhdr)
429436 return false ;
430437
@@ -446,12 +453,14 @@ JpgInput::read_uhdr(Filesystem::IOProxy* ioproxy)
446453 // Decode Ultra HDR image
447454 // and check for decoding errors.
448455 uhdr_error_info_t err_info = uhdr_decode (m_uhdr_dec);
456+ std::cout << " INVESTIGATE: error_code=" << err_info.error_code << std::endl;
449457
450458 if (err_info.error_code != UHDR_CODEC_OK) {
451459 errorfmt (" Ultra HDR decoding failed with error code {}" ,
452460 int (err_info.error_code ));
453461 if (err_info.has_detail != 0 )
454- errorfmt (" Additional error details: {}" , err_info.detail );
462+ std::cout << " INVESTIGATE: error details = " << err_info.detail << std::endl;
463+ // errorfmt("Additional error details: {}", err_info.detail);
455464 uhdr_release_decoder (m_uhdr_dec);
456465 return false ;
457466 }
@@ -488,6 +497,7 @@ JpgInput::read_uhdr(Filesystem::IOProxy* ioproxy)
488497
489498 return true ;
490499#else
500+ std::cout << " INVESTIGATE: read_uhdr placeholder" << std::endl;
491501 return false ;
492502#endif
493503}
0 commit comments