Recent comments

Reply to: Identifying/decomposing raw formats   4 days 4 hours ago

Hi Alex,

Thank you so much for the quick reply and the helpful information!

I still shoot uncompressed raw on my old Sony cameras as the compressed raw format isn't lossless. I do convert everything to DNG eventually as the format I'm working with, but I do like to archive the original out-of-camera files, probably out of paranoia. :)

I'll take a look at the fields you've mentioned and see if I can build something on top of that!

Cheers,
Marcus

Reply to: Identifying/decomposing raw formats   4 days 6 hours ago

Unfortunately, the information you are asking about and in the form you are asking about is not available in the library (in its direct form).

You can query the (function) name of the decoder used by calling LibRaw:get_decoder_info() and create your own table indexed by the decoder name and containing the properties you need.

In practice, there are very few uncompressed formats now: photographers prefer to save space on flash cards and camera manufacturers follow this wish. Such uncompressed files may still present in archives, but it is hard to find an uncompressed file produced by modern camera (even if camera supports it, photographer will, most likely, switch to compressed format).

If you still want to handle uncompressed formats separately: they can be tiled/striped, so you'll need to add own code that interprets this correctly.

For uncompressed/not tiled data, data starts at libraw_internal_data.unpacker_data.data_offset and
data size is libraw_internal_data.unpacker_data.data_size
These fields are protected (in C++ terms), you may need to subclass LibRaw to access these fields.

Reply to: Steps for building dcraw_emu with USE_DNGSDK   1 week 1 day ago

No worries Alex, thanks for the reply and thanks joostn for your CMake steps!

I had started on a process from scratch last week after seeing Alex's reply and put up a gist for the macOS side here before I saw joostn's reply: https://gist.github.com/mikamikem/4e826bb9cf5beacd86ba00e42ba0b115#file-...

Linux steps here: https://gist.github.com/mikamikem/6cf1530b2fa7b011eadd46e19ed9aab7#file-...

I'm not a huge fan of my steps (a few of the stages feel like major hacks), so I might re-approach this with your CMake file and diff when I have time in the future. Thanks again for sharing!

Reply to: Sony YCbCr white balance difference seems off   1 week 5 days ago

Not sure it will be available in the next snapshot, sorry.

Reply to: Sony YCbCr white balance difference seems off   1 week 5 days ago

Ah yes, the problem is fixed!

Will this be fixed in LibRaw? I guess I'll have to wait for the next public snapshot?

Thanks
Joost

Reply to: Steps for building dcraw_emu with USE_DNGSDK   1 week 5 days ago

Oh and I'm applying this patch to make it compatible with current jxl library:

--- a/dng_sdk_1_7/dng_sdk/source/dng_jxl.cpp
+++ b/dng_sdk_1_7/dng_sdk/source/dng_jxl.cpp
@@ -2283,6 +2283,7 @@ void dng_jxl_decoder::Decode (dng_host &host,
 			// result of JxlDecoderGetColorAsEncodedProfile?
 
 			JxlPixelFormat format = { 3, JXL_TYPE_FLOAT, JXL_NATIVE_ENDIAN, 0 };
+			(void)format;
 
 			#if qDNGValidate
 			if (gVerbose)
@@ -2293,7 +2294,7 @@ void dng_jxl_decoder::Decode (dng_host &host,
 
 			if (JXL_DEC_SUCCESS ==
 				JxlDecoderGetColorAsEncodedProfile (dec,
-													&format,
+													// &format,
 													JXL_COLOR_PROFILE_TARGET_ORIGINAL,
 													&color_encoding))
 				{
@@ -2442,7 +2443,7 @@ void dng_jxl_decoder::Decode (dng_host &host,
 
 				CheckResult (JxlDecoderGetICCProfileSize
 							 (dec,
-							  &format,
+							  //&format,
 							  JXL_COLOR_PROFILE_TARGET_ORIGINAL,
 							  &profile_size),
 							 "JxlDecoderGetICCProfileSize",
@@ -2469,7 +2470,7 @@ void dng_jxl_decoder::Decode (dng_host &host,
 
 				CheckResult (JxlDecoderGetColorAsICCProfile
 							 (dec,
-							  &format,
+							  // &format,
 							  JXL_COLOR_PROFILE_TARGET_ORIGINAL,
 							  profile,
 							  profile_size),
-- 
Reply to: Steps for building dcraw_emu with USE_DNGSDK   1 week 5 days ago

I'm building the DNG SDK using cmake and this CMakeLists.txt. This creates a static library, on Windows, Linux and macos.

cmake_minimum_required(VERSION 3.15)
project(dng)
 
INCLUDE_DIRECTORIES( ${JPEG_INCLUDE_DIR} )
ADD_DEFINITIONS( ${JPEG_DEFINITIONS} )
 
INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} )
ADD_DEFINITIONS( ${ZLIB_DEFINITIONS} )
INCLUDE_DIRECTORIES( ${JXL_INCLUDE_DIR} )
ADD_DEFINITIONS( ${JXL_DEFINITIONS} )
INCLUDE_DIRECTORIES( ${XMP_INCLUDE_DIR} )
ADD_DEFINITIONS( ${XMP_DEFINITIONS} )
 
FILE(GLOB SRCFILES ${CMAKE_CURRENT_SOURCE_DIR}/dng_sdk/source/*.cpp)
FILE(GLOB HFILES ${CMAKE_CURRENT_SOURCE_DIR}/dng_sdk/source/*.h)
ADD_LIBRARY(dng-sdk STATIC ${SRCFILES})
 
TARGET_INCLUDE_DIRECTORIES( dng-sdk INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/source )
SET_TARGET_PROPERTIES(dng-sdk PROPERTIES PUBLIC_HEADER "${HFILES}")
 
set_property(TARGET dng-sdk PROPERTY CXX_STANDARD 17)
 
TARGET_COMPILE_DEFINITIONS( dng-sdk PUBLIC
                            -DqDNGThreadSafe=0
                            -DqDNG64Bit=1
                            -DqDNGDebug=0                      # do not compile debug code
                            -DqDNGValidateTarget=0             # do not build dng_validate-binary
                            -DqDNGUseLibJPEG=1                 # use libjpeg
                            -DqDNGXMPFiles=0 -DqDNGXMPDocOps=0 # build minimal XMP-set
                            -DqDNGUseStdInt=1                  # Must be set to 1, else do not compile under Linux.
)
 
# Check processor endianness (todo: not sure bigEndian platforms are set correctly)
INCLUDE(TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
IF(NOT IS_BIG_ENDIAN)
    TARGET_COMPILE_DEFINITIONS( dng-sdk PUBLIC -DqDNGLittleEndian=1)
ENDIF(NOT IS_BIG_ENDIAN)
 
IF (WIN32)
    if(MSVC)
        TARGET_COMPILE_OPTIONS( dng-sdk PRIVATE /GR /EHsc)
    else()
        TARGET_COMPILE_OPTIONS( dng-sdk PRIVATE -fexceptions)
    endif()
    TARGET_COMPILE_DEFINITIONS( dng-sdk PRIVATE -DqWinOS=1 -DqMacOS=0 -DqLinux=0 -DWIN_ENV -DWIN32 -D_WINDOWS)
ELSEIF (APPLE)
    TARGET_COMPILE_OPTIONS( dng-sdk PRIVATE -fexceptions )
    TARGET_COMPILE_DEFINITIONS( dng-sdk PRIVATE -DqWinOS=0 -DqMacOS=1 -DqLinux=0 -DMAC_ENV)
ELSE()
    TARGET_COMPILE_OPTIONS( dng-sdk PRIVATE -fexceptions -fPIE)
    TARGET_COMPILE_DEFINITIONS( dng-sdk PRIVATE -DqWinOS=0 -DqMacOS=0 -DqLinux=1 -DUNIX_ENV)
ENDIF()
 
install(TARGETS dng-sdk DESTINATION lib PUBLIC_HEADER DESTINATION include)
Reply to: Sony YCbCr white balance difference seems off   1 week 5 days ago

Could you please check with RawDigger 1.4.10 beta: https://www.rawdigger.com/news/rawdigger-1-4-10-beta

Reply to: Sony YCbCr white balance difference seems off   1 week 5 days ago

I'm using the latest RawDigger, 1.4.9 Release Build 821 (ARM64).

Here are 2 screenshots from Adobe camera raw, showing identical colors when using 'As Shot':

https://drive.google.com/file/d/1GhtJUCtIGRBP4FbReq2Jdk5vvPpoKy8X/view?u...
https://drive.google.com/file/d/1skhE7-up6nEWymxM9JShH10mO4ucm3ZL/view?u...

Reply to: Sony YCbCr white balance difference seems off   1 week 5 days ago

What exact RawDigger version you use for your testing (Windows: Menu - Help - About; Mac - Menu - RawDigger - About)

Reply to: Steps for building dcraw_emu with USE_DNGSDK   2 weeks 17 hours ago

We cannot provide support for components from other vendors. For all questions related to dng sdk please contact Adobe support.

As an exception for the rule above: to create Adobe DNG SDK library (shared or static) just create corresponding build target (static or shared library) in your build environment (MS VS, XCode, whatever...) with all Adobe DNG SDK sources excluding source/dng_validate.cpp

Reply to: JPXL preview in DNG, Adobe DNG SDK   2 weeks 6 days ago

Thanks, Alex!

This saves on step. I was already fiddling with the imgdata.thumbnail.
I now need to figure out how to decode the JXL data into something my software can use. Looking at the JXL official library at the moment...

Reply to: JPXL preview in DNG, Adobe DNG SDK   3 weeks 1 day ago

We managed to support JPEG-XL and Canon H265 previews in dcraw_make_mem_thumb via this patch/commit: https://github.com/LibRaw/LibRaw/commit/cc118c1c1869e2559dbd0c7639d21915...

Reply to: JPXL preview in DNG, Adobe DNG SDK   3 weeks 1 day ago

Unpacked JPEG XL thumbnail is available via imgdata.thumbnail (and .thumbs_list)

We'll improve dcraw_make_mem_thumb() to handle it too, although this is just another buffer allocation and as-is data copy for JPEG-XL case

Reply to: ~25% exposure bump in some processed images?   3 weeks 5 days ago

That was it: I set adjust_maximum_thr = 0 and now my captures are consistent. Thanks very much!

Reply to: ~25% exposure bump in some processed images?   3 weeks 5 days ago

You got hit by 'automated maximum adjustment' code implemented in LibRaw's postprocessing many years ago to avoid 'pink clouds' problem: real data range is not present in RAW metadata while real data maximum is lower than format maximum.

To turn the feature off: use
imgdata.params.adjust_maximum_thr = 0;
(corresponding dcraw_emu command line switch: -c 0)

Here are your 0018 file processed via:
dcraw_emu -w -T and dcraw_emu -w -c 0 -T respectively
https://www.dropbox.com/scl/fo/8bgts0j5m5aa8007czqkf/AC8-URS3v42QVYOD_wk...

Reply to: White balance problem   3 weeks 5 days ago

It is hard to discuss something without having files in question on hands.

Probably: your Sony (!) images are shot in Small/Medium (pseudo)RAW mode. This is YCC files (similar to lossless JPEGs), already processed and white balanced in camera.

Reply to: Link for LibRaw-0.21.3-macOS.zip not working.   1 month 6 days ago

All looks good now, thanks very much!

Reply to: Link for LibRaw-0.21.3-macOS.zip not working.   1 month 1 week ago

rebuilded, reuploaded, downloaded to another computer: should work now

Reply to: Link for LibRaw-0.21.3-macOS.zip not working.   1 month 1 week ago

Thanks for fixing that link. Source files and libraries are fine. However the /bin subfolder, normally containing executables such as dcraw_emu, is empty in LibRaw-0.21.3-macOS.zip aside from the .keep_me file.

Best Regards,
AJW

Reply to: expire Next Major Version,more Camera List   1 month 2 weeks ago

It is disclosed on this site 1st page: https://www.libraw.org/#updatepolicy

Reply to: Link for LibRaw-0.21.3-macOS.zip not working.   1 month 3 weeks ago

Thank you for your feedback

Fixed

Reply to: Build problem   1 month 3 weeks ago

Glad to hear that our advice to start over from scratch and not use development tools that you don't understand what they do helped you.

Reply to: Build problem   1 month 3 weeks ago

Good morning, Alex.

github problems healed overnight.

So I could just pull the repository into a clean directory and run a fresh compile of libraw from master using your suggested simpler way to compile, which avoids configure before make.

make -f Makefile.dist

The created binary of static libraw.a is now usable and can be linked with no unresolved symbols from both master branch and also version 0.21.

My finding is:

The suggested way to compile the binaries using 'autoreconf --install' and 'configure' messed up the source repository and build pipeline specifically on our macos environment. For some unknown reason this ended up in an unusable binary of the static libraw library that could not be linked due to 'undefined symbols'.

I should add, that autoreconf/configure requires installation of additional tools using homebrew package manager on Mac, namely autoconf, automake and pkg-config, that are not part of the standard Apple development environment XCode. Seems these tools messed up detection of the proper C/C++ make configuration on mac platform which led to incompatibilities linking two different libraries (undefined symbols).

I rolled back to plain Apple XCode C/C++ development tools, and uninstalled autoconf & Co, before I tried a fresh install of libraw. That said, autoreconf/configure is not possible by using XCode only on Mac plaform.

Apologies, but I didn't dig deeper in analysis what exactly fails using autoreconf/configure on mac, thus cannot provide insights what could be improved for libraw to be installed the suggested way on macos Sonoma.

Avoiding the suggested installation to run autoreconf/configure to compile libraw static binary on mac Sonoma platform is the solution in my case.

Thanks again for your help.

Thilo

Pages