Beginner - How do I get pixel dimensions to match?

Specs:
RawTherapee 4.2.1
RawTherapee_WinVista_64_4.2.1.exe
Windows 7
Nikon D5100

My raw files are 4928 x 3264 but when I open them in RT they are 4940 x 3272. How can I get RT to open my files at 4928 x 3264 ? TIA

Everything is correct.

As a new user of RawTherapee this confuses me. How can I reconcile that ViewNX 2, IrfanView and Windows Explorer all report that my NEF files are 4928 x 3264? Does this mean that if I want to use RT and have the output match my other photos I must crop them?

Your starting assumption, that your “raw files are 4928 x 3264”, is incorrect.

The sensor contains a certain number of photosites, this number does not change. But these photosites are not pixels, and the data from them needs to be translated to arrive at what we called a pixel.
http://rawpedia.rawtherapee.com/Demosaicing

The image size discrepancy depends on how the demosaicing algorithm handles the information from the sensels (photosites) around the edges of the sensor. Some programs don’t handle them well and so crop them off which makes the image a little smaller; others, like RawTherapee, do handle them well and don’t need to waste them (or crop less of them off).

The metadata contained in your image reflects the size of something, but of what? Probably of the size of the embedded JPEG image. Every raw image contains one or more embedded JPEG images. But this number is not special or holy in any way. It just is what it is. And RawTherapee’s is higher, enjoy it.
http://rawpedia.rawtherapee.com/The_Image_Editor_Tab#Eek.21_My_Raw_Photo_Looks_Different_than_the_Camera_JPEG
http://rawpedia.rawtherapee.com/The_File_Browser_Tab

You can crop the image in RawTherapee if you wan’t it smaller, though why would you.

2 Likes

Thank you for the answer. I had no idea that was the reason for the discrepancy. I thought I changed something I couldn’t undo. IMO your post would be a useful addition to rawpedia so other newbies like me wouldn’t think something is wrong.

Only because I’m a stickler for consistency. :grin:

You can crop the image in RawTherapee if you wan’t it smaller, though why would you.

100% viewfinders become less than 100% when you un-crop the raw file.

I don’t have any experience with them myself, but someone on reddit once claimed to me that he could compose to the pixel on his D610. I don’t believe that at all, but I do believe you might be able to on an EVF and if you’re fastidious when composing, the extra image size might make more post work to clean up the edges.

Just for a simple illustration, you can still get this Trigonomic’s photo here.

The declared resolution of the raw image (in metadata) is 4992x3280. Some programs, but not all of them, show this as image info.

Resolution of embedded preview jpg, extracted with ExifTool, is 4928x3264, that matches Nikon’s specifications for the camera.

After processing this NEF file with different tools, exported JPGs have slightly different sizes (or not):

RT 4.2.745: 4940x3272
LightZone 4.1.5: 4938x3270
darktable 2.0.1: 4946x3280
UFRaw 0.22: 4946x3280

Sorry, I was just a little too late with this, perhaps just in case.

1 Like

Sounds like the beginning of a tall tale from Scotland…

I have the same question. I’d like to revive this thread.

I have two raw file types on-hand: A CR2 from a Canon T3i and a ORF from a Olympus OM-D E-M5 mark II. Both produce raw files a few pixels larger than the ‘finished’ dimensions produced by the camera (eg., the JPG dimensions). I think that’s so that ‘edge effects’ due to demosaicing algorithms, etc, can be trimmed away, or maybe it has something to do with stabilization.

I noticed in the CR2 metadata:

Sensor Width : 5344
Sensor Height : 3516
Sensor Left Border : 152
Sensor Top Border : 56
Sensor Right Border : 5335
Sensor Bottom Border : 3511

The finished dimensions (eg, JPG) from this Canon are 5184x3456. From the data above, Top - Bottom + 1 = 3456, Right - Left + 1 = 5184

Is there a setting in RT that automatically uses this metadata information to set the crop margins as directed by that metadata? Then the exported image would have the same dimensions (and pixel alignment, which is my current interest) as the images produced by the camera and other raw processors.

I think the original poster has a point that it can be nice to have all finished images from a camera to be consistent dimensions, regardless of raw processor. Others may like to use all the pixels available, as pointed out by earlier respondents. An option would support both. (If no option were presented, I think a strong argument could be made that the default should be the finished dimensions specified by the manufacturer’s camera, not the raw dimensions.)

I think it’d be a handy feature, if it doesn’t already exist.

RT v4.2.1234

The dimensions of jpeg should be divisible by 16, to allow some lossless operations (crop, rotations, …), this is the reason because you have 4928 instead of 4940, 4936 or 4932, and 5184 instead of something around 5340…
All the jpeg produced by cameras have such dimensions (divisible by 16), and the sensors are slightly bigger.

If you want your final output to be a specific size, I’d recommend a combination of resizing and setting an aspect ratio in the crop tool. You should be able to save those as a partial preset, then apply them to your images as necessary.

No, rt already crops the ‘border effects’ from demosaicing algorithm. ‘Fast demosaic’ may be an exception as it has a 1 px ‘bad’ border, but it was mostly used in past for fast preview, not for final processing.

Set the crop size and position in your default PP3 for each of your cameras.
See the section on creating processing profiles:
http://rawpedia.rawtherapee.com/

Does anyone know if those makernote values (eg., Sensor Left Border for Canon, and Crop Left for Olympus) are fixed values? For a given camera? For every shot?

I was assuming they varied shot-by-shot, perhaps relating to stabilization. But maybe they are one-time alignment parameters or similar.

I tried googling around but wasn’t able to find anything definitive. I looked at the values in a bunch of shots I have onhand and all had the same values.

If they are fixed (eg., per camera), then it’d not be all that onerous for each RT user to set cropping defaults in an RT profile, as suggested above. (Though I think RT would be more complete/convenient if it did it.)

So, I wonder how those makernotes are to be interpreted.