DaveStrickland / AstroPhotography

Python workflow for processing astrophotography images from either digital cameras and/or amateur telescopes.
GNU General Public License v3.0
19 stars 3 forks source link

Imageio output issues within dksraw: slow or lossy #6

Open DaveStrickland opened 3 years ago

DaveStrickland commented 3 years ago

Writing a PNG format greyscale from the test image:

2021-03-10 06:39:09,385 | DEBUG | AstroPhotography | Greyscale image generated.
2021-03-10 06:39:09,472 | INFO | AstroPhotography | Writing 2602x3906 uint16 image to test_linear.png
2021-03-10 06:39:54,606 | DEBUG | AstroPhotography | Wrote 7.059 MB file successfully in 45.135 seconds (0.156 MB/s)

Writing jpg forces conversion down to 8 bits:

2021-03-10 06:47:41,385 | DEBUG | AstroPhotography | Greyscale image generated.
2021-03-10 06:47:41,441 | INFO | AstroPhotography | Writing 2602x3906 uint16 image to test_linear.jpg
Lossy conversion from uint16 to uint8. Losing 8 bits of resolution. Convert image to uint8 prior to saving to suppress this warning.
2021-03-10 06:47:41,763 | DEBUG | AstroPhotography | Wrote 0.120 MB file successfully in 0.322 seconds (0.373 MB/s)

Writing TIFF is fast though:

2021-03-10 06:54:17,079 | DEBUG | AstroPhotography | Greyscale image generated.
2021-03-10 06:54:17,137 | INFO | AstroPhotography | Writing 2602x3906 uint16 image to test_linear.tiff
2021-03-10 06:54:17,593 | DEBUG | AstroPhotography | Wrote 20.327 MB file successfully in 0.456 seconds (44.566 MB/s)

Suggested solutions: