BMP or JPEG? Can one tell the difference?

Discussion in 'Mac Basics and Help' started by hajime, Dec 26, 2016.

  1. hajime, Dec 26, 2016
    Last edited: Dec 26, 2016

    hajime macrumors 68030

    Jul 23, 2007
    Hello, I read that BMP format produces better quality but the file size is large. JPEG is the other way around. Although I am using a MBP 2010 now, I plan to upgrade the computer to the best available one next year. Is there a noticeable difference when the photos are printed, displayed on a 4K/5K display, displayed on a retina device (rMBP or iPad PRO of next year) and on a LCD monitor 3-5 years old?

    I did some simple tests. On my MBP 2010 17", under Preview, a photo saved in BMP format appears to be brighter and richer in colors. However, the file size difference is 24.9MB vs. 512KB. I wonder if photos in BMP format under retina display, 4K and 5K are much much better than the same photos in JEG format.

    Eventually, I need the files in eps format. Converting MBP to EPS and JPEG to EPS does not change the quality.
  2. Toutou macrumors 6502a


    Jan 6, 2015
    Prague, Czech Republic
    There is a fundamental difference between the two. JPEG is a lossy format, BMP is lossless. What does it mean? When you save a picture as JPEG, a smart algorithm looks for ways to describe the areas in the picture in a simple way. For example, the blue sky on your picture doesn't need to be described as thousands of separate blue pixels, but as an area of blue color. I'm oversimplifying here, but you get the idea, right? The algorithm is very smart and does its thing carefully, so the loss of quality is usually almost negligible, while the file size can be easily a fifth or a tenth of the original.

    BMP is a lossless format. That blue sky on your photo gets written as thousands upon thousands of separate pixels, each with their exact hue and brightness. No information is lost when a BMP is resaved, so we call it a lossless format.

    Now, most consumer cameras shoot to JPEG. Most images passed around are JPEGs. Lossless formats (not only BMP) are mainly used by graphics and photographers to store their original work to revisit or redistribute later.

    I'll give you an example. There is a beautiful photo of a forest. It's a lossless original, the file size is 30 MB. Now let's try to make a JPEG out of it and let's play with the quality slider. First try, the resulting file size is 300 KB, a hundredth. The image is distorted, the colors are banded together and it looks like a still from a VHS. Another try, more quality, the file size is now 1 MB. The image is clear and with just a few artifacts. The tiniest details for a little mangled up, but hey, we're at 1/30 size. Let's push the slider further. Now the result is a 5 MB file. It looks pretty much identical and you'd have a hard time distinguishing between the two even on a retina display. It's totally sufficient for viewing and distribution.
  3. dwig macrumors 6502

    Jan 4, 2015
    Key West FL
    The quality loss with JPEG's compression varies with subject matter and with the compression level chosen when creating the JPEG. At the more modest compression levels the quality loss is minor, but at the higher compression levels it can be rather severe.

    It should also be noted that is it totally impossible for any application to actually edit the image data in a JPEG. Instead, all apps have to decompress the JPEG into an uncompressed bitmap in whatever their internal memory format is (usually a TIFF-like or BMP-like structure). All of the compression artifacts and other losses created by the original JPEG save are present in that memory image. If it is resaved as a JPEG the app will have to reapply the lossy compression adding further quality degradation. For this reason, if you are concerned at all about the image quality you should NEVER save any digital image as a JPEG except to save a JPEG copy for display while keeping a "master" file in an uncompressed format or a format that supports lossless compression. All future edits should be done to the master file or a copy of it saved in a lossless format. TIFF and PNG support both lossless compression and lossy compression options (provided your software gives you access to those options) in addition to an option for uncompressed files.
  4. hajime thread starter macrumors 68030

    Jul 23, 2007
    In case I embed about 20 photos in a pdf file and the pdf file would be sent by emails to various people. is it better to use the JPEG version? I suppose if I use the BMP version of the photos, the pdf file would have a large file size. Am I correct?

    Given that storage is relatively cheap these days, the idea of saving the original photos in BMP format is good.

    Too bad the application I extracted the video images from only supports saving in BMP or JPEG. I read that PNG is a good option which is somewhere between BMP and JEPG.
  5. ardchoille50 macrumors 68020

    Feb 6, 2014
    I wonder if it would help to extract as BMP and then open the BMP file in an image editor and do a Save As to get a good PNG file.
  6. chabig macrumors 68040

    Sep 6, 2002
    I believe BMP is an archaic technology. It was the Windows/DOS equivalent to the industry standard TIFF.
  7. jtara, Dec 26, 2016
    Last edited: Dec 26, 2016

    jtara macrumors 65816

    Mar 23, 2009
    There's no good reason to use BMP. It is obsolete, as pointed out above.

    If you are taking the photos, and doing it on a REAL camera, capture it as RAW. Use the RAW original to make whatever format(s) you need for publication.

    PNG is a good lossless format with compression nevertheless.

    "Extracting" from JPEG will never get you more quality than in the original JPEG. In fact, it will almost always get you LESS. (You might do some cleaning-up in an editor, but now you don't really have the original photo, but a manipulated one.)

    You should never use JPEG for line art, etc. It really should only be used for photos, and - for the best quality, only as the LAST STEP in producing an image of acceptable quality for your end use. (e.g. take pictures using RAW). But starting with a high-resolution JPEG and scaling it down to a smaller size needed for publication in a GOOD photo editor will normally be acceptable. As will using of JPEG for PUBLICATION.

    BTW, there is some LIMITED editing possible of JPEG images losslessly. For example, JPEGs can be losslessly rotated, if you do it right. I've actually written code for this in the ancient past.
    --- Post Merged, Dec 26, 2016 ---
    Save in BMP from your obsolete capture program. Then convert to PNG using some conversion program.

    You are taking captures from a video? Facepalm.... You are starting with low-quality, already lossy-compressed images, and none of this should be of much concern. I would first do some filtering in a good image editor.

    Yes, you can tell the difference. JPEG will always have "fringes". It's just a matter of whether they are noticeable by eye and subjectively objectionable.
  8. dwig macrumors 6502

    Jan 4, 2015
    Key West FL
    That rotation is not an edit to the image data. It is an edit to the file's metadata that instructs the display app or editing app to rotate the image after decompression. Not all apps with obey this type of "rotation".
  9. hajime thread starter macrumors 68030

    Jul 23, 2007

    Thanks for the opinions. Here is the goal: Take the video and then for publication, extract the scenes at fixed interval as individual image files. Then, under Illustrator, place and line then up to make a large snapshot of video images.

    What I do is to use my iPhone 6s+ to take 4K video. Then, step through the video to save the specific frames as JPEG as I could choose only between JPEG and BMP (To avoid the possibility of having a very large pdf file.). Then, open and place them one by one in one Illustrator file to make the snapshot of video images. Finally, save it as EPS to make latex document.
  10. jtara, Dec 26, 2016
    Last edited: Dec 26, 2016

    jtara macrumors 65816

    Mar 23, 2009

    Metadata telling the display program to rotate the image came along later.

    You can actually rotate the GOPs with software. Losslessly. The content is actually changed. But there is no loss.

    Like I said, I've written software to do this. I know what I wrote. It wasn't a metadata change.

    But irrelevant to this discussion, so sorry I brought it up. Just pointing-out that there are some LIMITED transformations possible on JPEG without changing image quality.

    Why on earth would you use Illustrator to manipulate bitmap images?! It's a vector graphic editor. Yes, I know it has some bitmap capability, but, geez, use Photoshop. You can rent the CURRENT version by the month, you know.

    I guess you have some ancient version of Illustrator.

    Your original video is MP4. The frames will have to be decompressed from the stream, and it will be a compromise in any case. The weak link in your chain is probably whatever you use to extract the frames, and some ancient application may or may not do a great job. (Since whatever you use supports only BMP and JPEG, I make the assumption it is ancient.)

    Sure, save your images to BMP or any other lossless format, before cleaning them up in Photoshop. BMP is crazy, but whatever floats your boat. It will at least preserve whatever quality your extraction software was able to produce when it extracted the frames.

    If you used a digital SLR with a RAW mode, you might improve on quality by converting the RAW frames to PNG. There are a number of apps that will shoot raw stills on iPhone, but as far as I know, none for video.

    You might apply some light filtering in Photoshop to blur MPEG fringes. Since I don't know your target resolution or presentation format (are you going to print this on paper, and if so how?) impossible to say if it's worth-while to do.

    (Edited: I was initially under the impression that the source images were JPEG. If the source images were JPEG - e.g. iPhone STILLS and not captured raw, then there is no possibility of increasing the image quality by saving in BMP.)
  11. hajime thread starter macrumors 68030

    Jul 23, 2007
    Thanks. I have Illustrator and Photoshop (both CS6). As for extracting the snapshots from the 4K video (in .m4v taken from iPhone 6s+), I used Avidemux 2.6. It can only save in BMP or JPEG.

    I use Illustrator to line up the snapshots and save them all in one in EPS format for Latex document generation.

Share This Page