lib/chunky_png.rb in chunky_png-1.3.7 vs lib/chunky_png.rb in chunky_png-1.3.8

- old
+ new

@@ -119,9 +119,14 @@ # Exception that is raised if an expectation fails. class OutOfBounds < ChunkyPNG::ExpectationFailed end + # Exception that is raised when requesting the DPI of a PNG that doesn't + # specify the units of its physical pixel dimensions. + class UnitsUnknown < ChunkyPNG::Exception + end + def self.force_binary(str) str.respond_to?(:force_encoding) ? str.force_encoding('BINARY') : str end # Empty byte array. This basically is an empty string, but with the encoding