Search

Atalasoft Knowledge Base

INFO: RawDecoder Notes and Configuration Options

Tananda
DotImage

Atalasoft's RawDecoder used to use DCRaw, and still includes it for backward compatibility. However that library has not been updated in some time. We've switched our default to LibRaw (currently 0.22.0). However we also offer the ability to configure for external LibRaw so you can "bring your own" should you need a newer version than we include.

Tricks and Tips for Using the RawDecoder

Raw image files may have embedded JPEG or TIFF previews. DotImage does not detect file type by file extension, but instead by iterating through RegisteredDecoders.Decoders and checking each decoder by calling the decoder.IsValidFormat(stream) against the first 1KB of the file looking for header info. The long story short here is that a RAW image that has a JPEG or TIFF thumbnail embedded may be detected by the JpegDecoder or TiffDecoder as "this is my image to decode" and lead to problems.

 The fix for this is to ensure that if you're using RawDecoder you put it at the beginning of the RegisteredDecoders.Decoders collection

RawDecoder rawDecoder = new RawDecoder();
// set any rawDecoder.Property values you wish here
RegisteredDecoders.Decoders.Insert( 0, rawDecoder );

Sample Application for RawDecoder

 We have a useful little sample application that show off the RawDecoder

RawDemo makes use of some of the advanced settings you can set at the decoder level to directly decode Raw images.

Options for which Library to use

Under the hood, there are two main options: DCRaw or LibRaw. However, LibRaw can be configured to use our built in verion (currently 0.22.0 as of 2026.2.0.0.48), or can be configured to "bring your own"

  • DCRaw: When Uinsg DCRaw, we use uses dcraw-static-9.28. NOTE that DCRaw has not been updated since 2018. We keep this for backward compatibility only
  • LibRaw: DotImage 2026 includes libraw-0.22.0 (https://www.libraw.org/news/libraw-0-22-0-release)
  • By setting UseExternalLibrary to true you can also opt to bring your own

Configuring in App.Config or web.config

For desktop apps in .NET Framework, you configure in app.config, For .NET Framework Web apps, you configure in the web.config. For .NET 8+ it's in a config.json file

Example App.Config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <section name="Atalasoft" type="Atalasoft.Shared.AtalasoftConfigSection, Atalasoft.Shared" />
    </configSections>

    <Atalasoft>
        <RawDecoder LibRawLocation="C:\Folder\Subfolder\SubSubFolder" UserDefinedLibRaw="true" NativeLibValidationType="CheckSum" RenderingEngine="LibRaw" />
    </Atalasoft>
</configuration>
Details
Last Modified: Yesterday @ 9:29 AM
Last Modified By: Tananda
Type: INFO
Article not rated yet.
Article has been viewed 15 times.
Options
Also In This Category