Pablo's Mission Planning Website
Greetings Mission Planners,
A friendly reminder that if your going to change your email address (i.e. you're going to PCS) please let me know so I can remove you from the mailing list. Each week I get numerous returns for "addressee unknown" and it's a royal pain (with a high degree of uncertainty) for me to remove folks who've moved without telling me.
FalconView made it into one press release this week, but nothing that I could easily decipher.
Mission Planning Tip: Embedded Images
Several times a year I'm asked how I can send out an email that has eight or ten images but stays below 500kb. This question isn't as trivial as it may appear. When you go to "the show" you're likely to find yourself in a bandwidth challenged environment. Minimizing the size of image files and PowerPoint presentations can help get you the information you need when you need it.
Image file size is directly proportional to the size of the image in pixels and its color depth. Lets talk about these one at a time.
Knowing an image size would seem simple - just look at how much screen size it takes up. Unfortunately it's a bit more complicated than that - especially in PowerPoint. Often someone will take a graphic, paste it into PowerPoint and discover the picture is too big. It's easy to grab an image corner and resize it, but this only reduces the area the graphic covers on the slide. You'll still carry all the original pixels along for the ride and pay for it in file space. You can see this when you get pictures from someone's new digital camera. Things look the same on your computer screen (Outlook resizes it to fit) but the pictures may take lot longer to download and they fill up your Inbox real quick. These newer images contains more detail than one you would have received a few years ago, but you won't gain any advantage unless you plan on printing them out with quality ink and paper.
The first color computer displays could show 256 colors simultaneously. Encoding 256 colors requires eight data bits and so it's often called 8 bit color. Modern monitors can display up to 32 bit color, but as color depth increases, so does the memory needed. The number of colors on screen has increased, but this hasn't helped Mission Planning because CADRG maps use just 216 colors. PFPS 3.1.2 could run could run on an 8 bit color display but 3.2 and beyond require at least 16 bit color. The extra color depth is for some of the newer overlay types (like Shapefiles), not for maps.
The final factor in image size is the file format. JPEG is the most widely used file format because the compression is effective and license free (i.e. the developers don't have to pay anything to use it), but it has some issues that may make it unsuitable for your purposes. JPEG is a lossy format so detail can be lost during compression. JPEG also has a minimum color depth of 24 bits. If you've got an 8 bit color image you'll be carrying around three times as much color information as you need. PNG (pronounced "ping") stands for Portable Network Graphic. PNG images are losslessly compressed, so no detail is lost and the file format is happy with 8 bit color. On the downside, since the compression is lossless it (normally) can't match the compression performance of JPEG. The final most common format is a bitmap. A BMP image isn't compressed so (by definition) it's lossless. Of course bitmap images end up being huge.
Lets look at a few examples. We'll start with a basic image from FalconView that contains a handful of lines.
The image size in the different formats are as follows:
The image embedded in your email is a 16 (4 bit) color PNG. Although JPEG's compression is lossy, it can't catch up with the reduced color depth of the PNG files. Next lets take a look at a more complicated image:
The image above was generated in SkyView using SRTM DTED and Earthsat's GeoCover NaturalVue 2000 worldwide image mosaic. NaturalVue 2000 is a worldwide image map generated from LandSat 15 Meter multispectral (color) imagery. "Worldwide" means worldwide so you've got imagery coverage of places that are normally cloud covered as well as coverage of areas that are of little interest to others. The imagery is also in color, which makes is particularly well suited to 3D visualization as shown above. Using SRTM DTED and NaturalVue 2000 you can generate an image like the one above (Big Sur) or any location in the world. You can click here to see the full size image used in the file size comparison's below:
JPEG compression does better than PNG because of the increased image complexity. PNG has a nice head start with its reduced color depth, but JPEG is just too effective at compressing this image without a visible loss in quality.
Most pictures and screen captures aren't sent as bare images. Instead they're inserted into PowerPoint and MS Word. Unfortunately when you use Windows Copy and Paste commands (through Office 2000) you paste in a bitmap image. That's how you can end up with a PPT file with a handful of images that grows to 10 or 20 MB. This is more than an annoyance. If people can't download your presentation and you can't email your files you'll be stuck. Fortunately there's a way to take that huge bitmap and transform it into a small JPEG or PNG image - even if it's stuck inside a PPT presentation.
Office comes with a basic image editor called Photo Editor. It's not what I'd choose, but it 's loaded on most DoD PC's. You'll find it in the Microsoft Office Tools program group:
You can copy an image to the clipboard using a program's built in commands. For example in FalconView you'd select Edit - Copy Map. You can capture your entire screen by pressing CTRL-PrtScn. If you're lucky you'll have a handy little program known as ZapGrab that lets you copy a section of the screen to the clipboard. I discovered ZapGrab almost three years ago and it's as useful now as it was then. After putting your image on the clipboard you'll paste it into Photo Editor by selecting Edit - Paste as New Image.
Once the image is in Photo Editor you can save it as a JPEG or PNG. To reduce the color depth of a PNG image click the "More" button and switch to 256 bit color:
Now that how do you get your file into PowerPoint? Select Insert - Picture - From File and browse to the image file you want:
Now you'll have the same image included in your PowerPoint presentation, but at a fraction of the file size you'd have had if you'd gone straight from the clipboard.
You probably noticed that this is a painful, multi-step process that most folks are likely to ignore unless they're in dire need. The good news is that starting with OfficeXP PowerPoint is smart enough to compress images (to a degree) on its own. If you need an easier tool you can consider NXPowerLite or other PowerPoint optimizers. NXPowerLite took a 1.2MB presentation I'd generated using particularly bad techniques (copy/paste from the clipboard then compressing the image to a corner of the slide) and compressed it to 30kb. That's a little over a 97% reduction in file size. It reduced the size of the presentation I'd generated from a JPEG by 2% and couldn't reduce the size of the presentation made with the Ping file at all. The nice thing about NXPowerLite is that folks can generate their presentations the way they always have, then use a tool at the end to optimize their files. Of course it costs money and you'd need approval to install it on your network.