gopro / gpr

General Purpose Raw image format
Apache License 2.0
116 stars 33 forks source link

Is there any downsize to convert GPR to DNG? #29

Closed stephane-archer closed 4 years ago

dnewman-gpsw commented 4 years ago

There is no quality or information lost in the conversion, however the DNG file will be between 3-5X larger than the GPR.

stephane-archer commented 4 years ago

It's because DNG contain jpeg preview and the way the raw data is compress? Is it correct? Any way to convert DNG to GPR?

dnewman-gpsw commented 4 years ago

GPR is a DNG file, will a new type of compression (SMPTE VC5), so a GPR can also contain a JPEG thumbnail (unfortunately GoPro doesn't that.) The reason not to add a JPEG, is that GPR are wavelet compressed, wavelets have a thumbnail inherent in the compression. The problem is tools like LightRoom don't use this ability, instead it will decode the entire image for gallery images. Yes you can convert most DNGs to GPRs.

stephane-archer commented 4 years ago

Thank you David for your great answers 🙏 What is wavelet compression? Do you mean you can decompress half of the data and get a half resolution raw file?

On Sun, Mar 29, 2020, 09:38 David Newman notifications@github.com wrote:

GPR is a DNG file, will a new type of compression (SMPTE VC5), so a GPR can also contain a JPEG thumbnail (unfortunately GoPro doesn't that.) The reason not to add a JPEG, is that GPR are wavelet compressed, wavelets have a thumbnail inherent in the compression. The problem is tools like LightRoom don't use this ability, instead it will decode the entire image for gallery images. Yes you can convert most DNGs to GPRs.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gopro/gpr/issues/29#issuecomment-605528903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWX4PJIHMSD3PBDHQ6C4RLRJZ367ANCNFSM4LUXFKFQ .

dnewman-gpsw commented 4 years ago

Yes. You can decompress part of the data to get a lower resolution image. A wavelet is a mathematical impulse function, these can be used for image compression without dividing the images into blocks (a quality advantage), most image compression systems use DCT (Discrete Cosine Transforms, and divide the image into blocks.) VC5/GPR is based on CineForm compression, you can see a demo of wavelet compression on the CineForm pages https://gopro.github.io/cineform-sdk/