The reason the FLAC is larger than the MP3 of the same data is because they encode differently. :) MP3 just encodes perceptual information, while FLAC stores every single speck of data, just in a more compact format.
- Converting a WAV to a FLAC is like converting a BMP to a PNG.
- Same exact pixels, but compressed losslessly like a ZIP file into a smaller size.
- Converting a WAV to an MP3 is like converting a BMP to a JPEG.
- Instead of storing exact pixels, it's really storing instructions for generating squares with ripples of color that look kind of like the original.
Similarly, MP3 just stores instructions for generating ripples that, when added together, sound kind of like the original. But the difference between the true signal and the generated signal (the error signal) consists of random noisy artifacts, like JPEG jaggies. When you then store this in a perfectionist format like FLAC, it needs to store all those jaggies, and random noise is harder to compress losslessly, so it increases the size of the file. (Truly random noise is incompressible. When you compress a file losslessly, you're eliminating redundant repeating patterns and making it look more like random noise.)
I bet if you convert the JPEG to PNG you will see the same kind of increase in size as you see when converting MP3 to FLAC, since the perfectionist lossless codec needs to remember every little jaggy and artifact that wasn't in the original bmp.
This analogy isn't perfect, since audio is more like a photo than a line-art diagram, but it helps get the idea across:
Original BMP size: 29 kB
PNG size: 629 B
JPEG size: 1.7 kB
PNG created from JPEG: 6.2 kB
To address your second question:
How to detect conversion from a lossy format like JPEG to TIFF or PNG
A visual way to tell if an image has been previously JPEG compressed is to zoom in on the image and look for signs of discontinuities between 8x8 pixel blocks. These are particularly obvious if the JPEG compression was high (low quality).
Low quality / High compression JPEG saved as PNG - 8x8 pixel blocks are clearly visible
But if the JPEG compression was low (high quality) then these blocks may be difficult to see...
High quality / Low compression JPEG saved as PNG - 8x8 pixel blocks are difficult to identify
So how to tell if this high quality image has been JPEG compressed at some point? JPEG compression deliberately drops more color information than intensity information and we can use Photoshop's Lab color mode to investigate further.
Convert your image to Lab color mode (Image -> Mode -> Lab Color). This converts the image from red, green and blue channels to L, a and b channels.
The L channel is the Lightness channel, essentially the greyscale version of the original image. The a and b channels are the color channels, but not in the traditional sense. A full explanation is not required for this answer but you can find more info on Wikipedia.
Inspect the a or b channel and look for 8x8 pixel blockiness.
'a' channel of previous image - 8x8 pixel blockiness visible, indicating JPEG compression
If either the a or b channels exhibit 8x8 pixel blockiness then that's a very good indication that the image was JPEG compressed at some point in the past.
Best Answer
FLAC is not compressed .WAV.
What I'm saying is that when you uncompressed a FLAC, you're not magically getting a .WAV file. Rather, the program you're using is decoding the PCM data and writing it back into the .WAV format just because it's the most common format. Since both formats are lossless, there's no loss in this transition, but the PCM waveform could just as well be written back to other lossless formats: such as Apple AIFF and CD audio.
Due to the age and popularity of the .WAV format in both consumer and professional, it just happens - by tradition and device support - to be lowest common denominator format, but wouldn't necessarily have to be.
I hope this provides a new angle to your question.
Similarly, a lossless image is a raster graphic, or bitmap, but bitmap data is not necessarily linked to the .BMP format, which is just specific way for storing bitmap data. Just like .WAVs, the popular usage of BMP mainly derive out of their simplicity (well documented, don't support lossy content, etc), and having been around for a while.
Other common lossless formats that are also uncompressed include:
In summary, there are no original format for either "audio" or "image" data, anyone could store it anyway they wish. What we have are common file formats and softwares that know how to translate between them.
To answer your question, it seems .BMP is not as much the de facto standard that .WAV got the be in the audio world. Whether the uncompressed format of choice is BMP, TIFF or RAW (or others) will depend on the type of application/business.