Opening DNG file using BioFormats shows Compression: JPEG

Hello,

I am trying to use a smartphone camera for image capture. I am using the Lightroom mobile app on my iPhone to be able to capture the images in DNG format.

To open the DNG files, I am using BioFormats in Fiji. Everything seems fine until I see in the Metadata window “Compression: JPEG”.

Can anyone let me know why there is compression shown here when the image is opened? This should still be an uncompressed DNG file…

I have opened the same image that was downloaded to my computer via iCloud instead of Lightroom and again opened it with BioFormats. In this case, the Metadata window shows “Compression: Uncompressed”. However, using this method I go from the 4032x3024 image from the Lightroom download method to 256x192 for the iCloud download method. Ideally, I would like to have the higher resolution Lightroom image that remains uncompressed.

I know that most people are probably not using smartphone cameras for their image capture, but here this is a major component of the project. Any advice on how to best combine smartphone image capture with transfer to Fiji and processing would be very helpful.

Thank you,
Mary

Do you know what format the original files are in? What all export options do you have in Lightroom, can you change the format or compression at all?

Hi there,

I’m able to capture and export the images in DNG format using Lightroom. This should just be transferring the original/uncompressed image from my phone to my computer.

I can change the capture format in Lightroom to DNG or JPEG, and I can change the export file type to JPEG, TIF, DNG, or Original. It doesn’t look like you can directly change the compression anywhere though besides just choosing a file format.

I tried exporting using the “Original” selection (which was also tagged as a DNG file since it was captured in DNG format) and then going through the iCloud download/BioFormats import method and got the same thing as before “Compression: JPEG” in the metadata window.

I’m wondering if the metadata window in Fiji is showing JPEG because there is a JPEG of the image tucked in the DNG file in addition to the uncompressed image?

I want to make sure that I’m not getting compression of my image somewhere along the way when importing to Fiji…

I’ve also tried just opening the image through File>Import>Image and get a 16-bit image but I’m not sure how to tell if its been compressed either…

Thank you for any advice you can provide!

Best,
Mary

If you want to upload the image to https://www.openmicroscopy.org/qa2/qa/upload/ I can verify if it is compressed or not. Bio-Formats wont add compression when reading or importing files so I suspect that the compression is there when the file is exported originally.

Great, thank you! I’ve just uploaded a test image.

Thanks Mary, from looking at the metadata tags from the image it does appear that the DNG is using a TIFF compression. It may be that Lightroom always uses some level of JPEG compression for any of its exports but I don’t know enough about that particular tool I’m afraid.

Hi @dgault,

I did some digging and found that Lightroom DNGs are based upon the “TIFF/EP6 Standard”. So all DNGs are technically TIFFs, but packaged in a set standard way created by Adobe.

So would this TIFF compression be categorized and labeled as a JPEG compression in the BioFormats import metadata window?

Thanks for looking into my uploaded image!

Best,
Mary

So, I have two different methods of importing my image from my phone to my computer. One method (Lightroom Download, APC_0064) shows the metadata as Compression: JPEG, the other method (iCloud Download, APC_0064 (2)) shows the metadata as Compression: Uncompressed.

I had someone on the Adobe Lightroom forum look into the compression in the first method. He checked the images and said that: “The iPhone DNG file is NOT compressed. The BioFormats app is interpreting the file data similarly to ExifTool lisiting Compression is JPEG when the file is using lossless compression.”

I would just use the method that has Compression: Uncompressed listed in the metadata (iCloud Download, APC_0064 (2)), but when I use this one, I get an image that has much worse resolution…

My end goal is that with my test images I want to determine the integrated density of ROIs, so I want to be sure that I’m able to upload and import as close to the original image as possible with as high of a bit-depth as possible, no/little compression, good resolution, and no loss of pixel data. I want to also be able to use the Lightroom app on my phone as a means of standardization, so DNG file type is the one I have to go with.

So I’m not sure if there Is a way for me to correct the resolution of the APC_0064 (2) image or if I should just ignore that the APC_0064 image metadata says JPEG Compression and assume that BioFormats is just categorizing this lossless compression as JPEG?

Any advice would be very helpful since I’m trying to combine a couple of different tools (Lightroom and ImageJ/BioFormats) that probably aren’t used together too often…

Thank you!

Sorry for the delayed response over the Easter break.

Yeah the DNG format is largely based around the TIFF format and uses EXIF tags for the metadata. These metadata tags which Bio-Formats reads are the same as the ExifTool will be reading, so LightRoom appears to be setting the metadata tag to say its JPEG compressed. A simple check would be to compare the file size of the 2 images, looking at the file size of the uploaded file it is slightly smaller than an uncompressed file should be so it would seem that there is compression being used.

1 Like

Hi @dgault,

Thanks so much for your help! I’ve checked in with a Lightroom forum and think I have a way to transfer and import the images into BioFormats with as little compression as possible. It looks like the image transferred using the first method is non-lossy compressed and doesn’t show artifacts when zoomed in. I think this should work fine for my images.

Thanks again for looking into this!

Best,
Mary