
On 2/15/21 3:22 PM, Roger Oberholtzer wrote:
Quality is just the compression. JPEG now supports lossless compression. That would be the best quality.
As to 12-bit components, I guess it depends on your software. If it is using the libjpeg that is installed system-wide, then you can probably only access up to 8 bit components. It is a compile-time thing for the library. I am not sure if it is enough to replace the libjpeg file or if you need to recompile your program as well. I suspect that you must recompile your program as well. And be sure it supports 12-bit. That is, it has no bad logic that assumes a component it 8-bits when allocating image buffer storage.
I think 12-bit support was just an experimental thing for JPEG. I don't think medical images are stored that way. That's where the main push for this has come from. I thought that medical images were usually some variant on TIFF. I don't really know.
Roger, Install the rpmbuild package and download the .srpm for libjpeg-turbo and install (as user NOT root), The edit the build options in ~/rpmbuild/SPECS/libjpeg-turbo.spec (or whatever the spelling actually is) and enable the 12-bit option or the build. Then you can build it with rpmbuild -bb ~/~/rpmbuild/SPECS/libjpeg-turbo.spec and see if the compile time setting works. You will likely have to install a couple of -dev packages (not many, and they are tiny, just headers usually), but the process isn't bad and you can try the different compile-time options that way. -- David C. Rankin, J.D.,P.E.