Skip to content

Commit

Permalink
Correct constant name for converting meters to inches
Browse files Browse the repository at this point in the history
  • Loading branch information
kobsy committed Nov 9, 2016
1 parent c169a7b commit 22aafd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/chunky_png/chunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ def initialize(ppux, ppuy, unit = :unknown)

def dpix
raise ChunkyPNG::UnitsUnknown, 'the PNG specifies its physical aspect ratio, but does not specify the units of its pixels\' physical dimensions' unless unit == :meters
ppux * INCHES_PER_METER
ppux * METERS_PER_INCH
end

def dpiy
raise ChunkyPNG::UnitsUnknown, 'the PNG specifies its physical aspect ratio, but does not specify the units of its pixels\' physical dimensions' unless unit == :meters
ppuy * INCHES_PER_METER
ppuy * METERS_PER_INCH
end

def self.read(type, content)
Expand All @@ -357,7 +357,7 @@ def content
[ppux, ppuy, unit == :meters ? 1 : 0].pack('NNC')
end

INCHES_PER_METER = 0.0254
METERS_PER_INCH = 0.0254
end

# The Text (iTXt) chunk contains keyword/value metadata about the PNG
Expand Down

0 comments on commit 22aafd3

Please sign in to comment.