Tag: png

  • SetDPI Utility Version 2

    View source on GitHub. A couple of years ago I made a small command-line program for setting the DPI/PPI of PNG files. I used the System.Drawing.Bitmap class (i.e. GDI+) to set this property, which had the unfortunate side effect of producing relatively bloated files. Given that the chunk specifying this property is only 21 bytes…

  • Retaining DPI/PPI Information with PNGGauntlet

    I’ve mentioned PNGGauntlet many times on this blog – it’s a great tool for squeezing the best compression ratios out of the PNG format. It combines the tools PNGOUT, OptiPNG and DeflOpt in a nice WinForms GUI. As part of the compression process, most chunks are removed by default. This includes the pHYs chunk, which…

  • Pixel-perfect Multi-DPI Images in WPF (Part 3)

    View source on GitHub. In Part 1 of this series, I discussed the problem of displaying different bitmap images at different DPIs in WPF. In Part 2, I proposed a solution using multi-frame TIFFs and two simple markup extensions. In this final post I will present a basic program that takes multiple images (PNG recommended),…

  • SetDPI Utility

    View source on GitHub. Updated 2013-01-06. Ken Silverman’s PNG compression tool PNGOUT (complemented nicely by the free .NET frontend PNGGauntlet) can be remarkably effective at trimming the size of PNGs without altering the image described within. However, in its quest to remove anything non-essential, PNGOUT by default strips out the image’s DPI (in fact PPI)…