Basic question: Why are camera jpegs larger than GD repros?
Posted: Sun Jan 27, 2008 9:40 pm
Please forgive me if this has been asked answered or considered trivially basic but I'm very curious.
Why is a jpeg from my digital camera (7 gigapixels, 1.5 Mb) three times larger than an image resulting by copying it with GD.
For example, the following code:
$im = ImageCreateFromJPEG("file1.jpg");
$width = ImageSx($im);
$height = ImageSy($im);
ImageJPEG($new, "file2.jpg");
will open a 1.5 Mb jpeg file, gets its image data, and copies it into a new jpeg file only 449 kb in size.
I'm assuming, the jpeg display information of the first file only accounts for 1/3 the file's information and that the resulting jpeg still has every bit of display information as the first but that all the raw camera information was also stored in the first file but not copied to the second.
I'm I at all close?
I'm just curious but I'd like to knew if an image reproduced with GD is any "less" than the original. Also I'm am now very curious about what the heck is jpeg information anyway.
-cheers
woozy
Why is a jpeg from my digital camera (7 gigapixels, 1.5 Mb) three times larger than an image resulting by copying it with GD.
For example, the following code:
$im = ImageCreateFromJPEG("file1.jpg");
$width = ImageSx($im);
$height = ImageSy($im);
ImageJPEG($new, "file2.jpg");
will open a 1.5 Mb jpeg file, gets its image data, and copies it into a new jpeg file only 449 kb in size.
I'm assuming, the jpeg display information of the first file only accounts for 1/3 the file's information and that the resulting jpeg still has every bit of display information as the first but that all the raw camera information was also stored in the first file but not copied to the second.
I'm I at all close?
I'm just curious but I'd like to knew if an image reproduced with GD is any "less" than the original. Also I'm am now very curious about what the heck is jpeg information anyway.
-cheers
woozy