Enhanced Export Chart Procedure. Tony wondered about my statement that PNG images were so much superior to JPGs for Excel charts. So he did a quick and dirty experiment, and reported in that there was not much difference.of tried the Export Chart add-in I posted in
When I checked out Tony’s charts, I saw that they were nearly identical, and if I weren’t looking for differences I may not have noticed much. The major difference is that his JPG was substantially larger, 15476 bytes vs. 9549 bytes for the PNG.
I did think the text and the axis lines were less crisp in Tony’s JPG, though the PNG also was not as sharp as I like in my charts. I’ve felt that Excel 2007 has added this fuzziness to its visuals; I explicitly turn off things like ClearType, and I don’t care for the fact that Excel imposes this feature on me without my consent. I suspect but have yet to confirm that Tony’s using Excel 2007. Tony has informed me that he is in fact using Excel 2003.
Tony’s test chart was pretty simple. I decided to do my own test using a somewhat more involved chart. Below are PNG, JPG, and GIF files of my chart, showing one of my favorite topics, pageview stats for my blog.
Excel 2003 Exported Chart, PNG format, 7580 bytes
Excel 2003 Exported Chart, JPG format, 23350 bytes
Excel 2003 Exported Chart, GIF format, 9064 bytes
There seems to be no visible difference between PNG and GIF. Colors in the JPG are not rendered as faithfully to the Excel chart as in the PNG and GIF. The PNG and GIF show sharp color transitions from pixel to pixel, as expected in a non-JPG bitmap image. Text and axis lines are rendered fine in the JPG, but there is a little muddiness around the markers in the JPG, which is particularly pronounced around the “x” markers. The JPG file is three times the size of the PNG, while the GIF is only about 15% larger.
I decided to test the output of my add-in in Excel 2007. The add-in works properly in Excel 2007, with the Export Chart button finding a home on the Add-Ins tab. The dialog works without any issues, and the image files appear where expected.
Excel 2007 Exported Chart, PNG format, 28028 bytes
Excel 2007 Exported Chart, JPG format, 20425bytes
Excel 2007 Exported Chart, GIF format, 17724 bytes
All of the Excel 2007 images look fuzzier and more washed out than their Excel 2003 counterparts. The colors are slightly washed out. There is obviously some anti-aliasing in the 2007 images, which can be seen comparing sloped series lines. The 2007 JPG shows a bit more fuzziness than the PNG and GIF, but it actually looks better in 2007 than in 2003. The interesting observation is that the PNG is the largest of the three image files, and the GIF is only slightly smaller than the JPG. In fact, the 2007 JPG is smaller than its 2003 counterpart.
Bottom line: For Excel 2003 and earlier, PNG and GIF exported images are smaller and crisper than the JPG images. For Excel 2007 it’s a wash: The 2007 JPG looks better than its 2003 counterpart, while the 2007 PNGs and GIFs have become less clear and sharp. This is probably due to the anti-aliasing built into Office 2007 shapes; which not only changes the exported image file quality, it also has had a profound negative effect on how Excel charts behave after being copied, then pasted as a picture. But that’s a topic for another day (note to self…).
Please feel free to share your thoughts on the quality of these images.