imogen 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/imogen.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTA2MDk1MWEyM2FhODg0MTMwZTcxOWY4NzY1NDc4YjZhMGYzNGJlMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmQyZjQwNWVmMWJjYzljYWQ2MTdlNDJkZGNjMmY4ZGYyNzBhODgwYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTBiZWY3YzlmODYyYWNkNGMwZjQ2NmNhMDk2MDk2NmJhMTU1YTEyMTNlNTE2
|
10
|
+
MmVhZjQxN2UxMTFkMDBjM2U3ZDg1YTI0NGYzMWFjZTdkYzk4MDYxZjk3MDc1
|
11
|
+
MDg5ZGRlYTY1NzU0MjlkNWNjOWJlYWFjYzA4MWFlOTNmM2E5MjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjE5NjRlZGM0NDYyNWFjYWUwYzUwYTQyNTc0NjY1YjI0OGNjNDAzYTMwYjgw
|
14
|
+
OTk0MjQ2ZGRkMTA3ZjdlMWQ3NGFkYTIzZTY3YzdmZDM5YmE3YmI1ODhmNmUz
|
15
|
+
OWI0YTM2ZTQyNDMyZWQ5MmExYTRiMGYzNjU2M2JiMTA0Mjc5YWY=
|
data/lib/imogen.rb
CHANGED
@@ -13,7 +13,7 @@ module Imogen
|
|
13
13
|
def self.convert(img, dest_path, scale=1500, format = :jpeg)
|
14
14
|
w = img.width
|
15
15
|
h = img.height
|
16
|
-
dims = (w > h) ? [
|
16
|
+
dims = (w > h) ? [scale, scale*h/w] : [scale*w/h, scale]
|
17
17
|
img.rescale(dims[0], dims[1]) do |scaled|
|
18
18
|
scaled = scaled.convert_to_24bits
|
19
19
|
dst = FreeImage::File.new(dest_path)
|