Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Convert dimensions values to integers
  • Loading branch information
EricR committed Dec 29, 2012
1 parent d948859 commit 344d7bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/image_sorcery.rb
Expand Up @@ -46,20 +46,20 @@ def identify(args={})
#
def dimensions
dimensions = identify(:layer => 0, :format => "%wx%h").chomp.split("x")
{ :x => dimensions[0],
:y => dimensions[1] }
{ :x => dimensions[0].to_i,
:y => dimensions[1].to_i }
end

# Returns the x dimension of an image as an integer
#
def width
dimensions()[:x].to_i
dimensions()[:x]
end

# Returns the y dimension of an image as an integer
#
def height
dimensions()[:y].to_i
dimensions()[:y]
end

# Runs ImageMagick's 'montage'.
Expand Down

0 comments on commit 344d7bb

Please sign in to comment.