How to remove border around image?

When opening a Raw file in RawTherapee, a black border appears around the image. On the right edge it’s about 4px, bottom edge 2px, rest 1px (could be part of the UI). I have not cropped, resized or rotated the image in RawTherapee.
41 42 48

In general not a huge deal since it can be cropped away after exporting, but still it would be great to avoid this step. I have read this is probably related to the demosaicing, but I don’t know how to get rid of the border. I can’t find the tool described here: Latest RawTherapee supports zero to 16 pix border for bayer raw files. I also can’t find a way to select the demosaicing algorithm as per Demosaicing - RawPedia.

Is there anything I can do? Any help is appreciated!

Please provide a raw file. Then I can tell you how to fix it

Cool! Raw file: DSCF3420.dng (55.3 MB)

This is not raw anymore. The dng contains an already demosaiced image. Unfortunatly adding a raw crop (which would have been the fix) for this camera to camconst.json does not work.

Because it’s not raw

Huh, you are right! When opening the raf file the camera produced, the border is gone. Thanks!

I recently started converting the raf files to dng before processing them, thinking this might be a good idea (It’s open, you know…). Now I also understand how the raf → dng converter manages to get more details from the raw. There is more processing involved than i thought. I guess I’ll tweak the RT settings then to get similar results.

In Adobe DNG Converter go to Change Preferences > Compatibility > Custom and make sure that “Linear (demosaiced)” is NOT selected.

The fact that DNG is an open standard does not mean you should prefer it over the RAF files. There are plenty of tools available that work just as well (or better :wink: ) with your raw files without needing a conversion step.

Thanks, very interesting. Indeed I noticed some different behaviours when using the Raf directly. But I also noticed something different:

Before I was using Iridient X Transformer to create the Dng files as I really liked the results this gave me. I guess they are using their own demosaicing algorithm. With RT, I use 3-pass Markesteijn, but now I am able to see a pattern in the developed file. I attached a Raw where this happens: DSCF3440.RAF (25.1 MB)

It’s really pronounced around the flare, but also happens in other files and becomes visible especially when raising exposure or shadows.

looks like pdaf banding issue

Is that really that fine grained? I have no pdaf cameras but it also looks a bit (mine had maze structure) like something I saw shooting an uwa lens against the sun with my Pentax gear. Same purple haze, isnt this a known fuji issue by the way?

Don’t know. Just was my first thought…
Anyway we should discuss this in a different topic as it as nothing in common with this one.

Yup, above is a 100% crop. Funny thing: This was shot with a Pentax lens :slight_smile:

I did a fair amount of Googling and it turns out not to be an issue exclusive to Fuji, Sony cameras have this as well. But I am not sure if this is Fuji’s purple haze issue or something else.

Though off topic, here’s a screenshot using demosaic ‘none’, which shows that each lower row of the xtrans green 2x2 green square is exposed differently than the upper row of the same 2x2 green square (in the region of the screen shot at least). I don’t know the reason for this behaviour.

It reminds me of the issue of Fuji xtrans in flares which is supposed to be caused by the xtrans CFA, or something like that. Some Fuji cameras are more prone to this than others.
Here’s a detailed analysis: Why and How Fuji Cameras Produce a Strange Purple Flare/Grid Artifact | PetaPixel

2 Likes