Uncompressed 24-bit RGB files

Anything that doesn't fit into any of the other forums
Post Reply
DonDavies
Posts: 3
Joined: Wed Jan 03, 2018 2:08 am

Uncompressed 24-bit RGB files

#1

Post by DonDavies »

It appears that there is no way to save RGB files in 3-Byte uncompressed files. PNG files are compressed, and if RGB files are saved as FITS they use 2 Bytes for each color, even though the data is only 8 bits, ie they take up twice as much space as necessary.

Am I missing something?
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Uncompressed 24-bit RGB files

#2

Post by admin »

PNG files are compressed, but the compression is lossless, which means that the compressed file is a perfect copy of the uncompressed file with no loss of detail. This means there is no good reason to have an uncompressed image file format for 8 bits.

cheers,

Robin
DonDavies
Posts: 3
Joined: Wed Jan 03, 2018 2:08 am

Re: Uncompressed 24-bit RGB files

#3

Post by DonDavies »

If you are writing your own image analysis software, operating with , for example, a BMP or FITS file is much easier. But when the FITS file is 2 X the needed size there is a huge waste of disk space.
I conclude from Robin's answer that there is no 24 bit uncompressed RGB format.
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Uncompressed 24-bit RGB files

#4

Post by admin »

What programming language/environment are you using? There are often libraries to load PNG images. If that is not available then adding a BMP output is possible.

cheers,

Robin
Post Reply