Lossless Compression:
Lossless compression is a method of data compression in which the original data can be perfectly reconstructed from the compressed data. The compression algorithm is designed to identify and remove redundancies in the data without losing any information. This means that the compressed data is an exact replica of the original data, with no loss of quality.
Lossy Compression:
Lossy compression is a method of data compression in which some information is discarded during the compression process, resulting in a smaller file size. This method is commonly used for digital media like images, videos, and audio. During the compression process, the algorithm analyzes the data and discards parts of it that are not in use in the final printed product. The result is a compressed file that is smaller in size.
Raw File
A raw file is an uncompressed and unprocessed image file format that contains all the information captured by a digital camera’s sensor when a photo is taken. Unlike other file formats like JPEG or PNG, raw files are not compressed or altered by in-camera processing, which makes them larger in size but also preserves more image data and offers greater flexibility for editing.
Raw files are typically saved with a specific file extension that varies depending on the camera manufacturer, such as .NEF for Nikon cameras, .CR2 for Canon cameras, or .ARW for Sony cameras. The raw file format varies between camera models and manufacturers, which means that different raw file formats may require different software to read and edit them.
Because raw files are not compressed or processed, they can be challenging to work with for inexperienced photographers or those without the proper software. However, they offer more creative control over the final image by allowing adjustments to exposure, white balance, and other parameters during post-processing without losing any image quality. Additionally, raw files can be used to recover details lost in underexposed or overexposed images, making them a valuable tool for professional photographers who require the highest quality image files.
Data Loss in Compression from Raw to JPG
When a raw file is converted to a JPG file, some data loss occurs due to the compression algorithm used in the process.
JPG files use a lossy compression algorithm, which means that some information is removed during compression to reduce file size.
This result in loss of final image data.
In a raw file, all the information captured by the camera’s sensor is retained, including color and light information. This allows for flexibility when editing the image because the original data is still intact.
However, when a raw file is converted to a JPG file, the unnecessary data for final quality is removed, resulting in a smaller file size but also a loss of information. This loss of information cannot be recovered or restored once the file has been converted.
In summary, while a raw file contains all the original image data and allows for greater flexibility when editing the image, a JPG file is a compressed image file that removes unnecessary data not in used in the image when printed ta achieve a smaller file size. The data loss that occurs during the conversion from raw to JPG cannot be recovered, so it is important to make a backup of the original raw file to preserve all image data received by the camera if post editing of your photographs is desirable.