imogen 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGE0NjZkODZkZGE5MzQzMjZlMDkxMTE0NWY4NjEzMmZlMjMzMTQwNg==
4
+ OTNlYjI5NTE1YzU0ZDIzNTQ2ODBkZGFlMGZiODhkYzQyZjg5ZDlmMg==
5
5
  data.tar.gz: !binary |-
6
- MDdkYTJjMThhMzEzNDQ3MDVlZGNhMjliYzBmM2E2YTczYWJhMzcwMA==
6
+ NDU2ZmNiZDc3YTkwZDQ5NTQ2ZDE4Zjc1MTQ0MjdlMTg3NmQyODYwZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGQ4ZmUyNWE4YjFmN2EyMDhlNjVhZWYxMzRlNjFmM2EyNWM3ODdkNTA1ZmZj
10
- NzYyNWRiZWEyMjhmY2Y0NGM2MzljMmRjNmEzM2U0ZTc0NmJlYTM2MDQyMmE4
11
- OTg1YmQ0NjlhYmUyMDRhY2YzOTg4YjRiOGNjZmU5MDg1MzAxM2E=
9
+ NmYwOGVhMDlhMzdkZGE0NjZkOWQzOGZjNThkZDI1ZTFjZTg5MTU0NGIwNzY4
10
+ ZmRhMjgzMTQ2MjgyMTY0OTQxMGE3OTdmYjllYzRiOTk0ZDkwNmI0MTQzOWNk
11
+ MWQ5YmNmZDAyZWUxMjc1OTAxNzY4NGY5OTgwYmM3MDA2ODk0NzI=
12
12
  data.tar.gz: !binary |-
13
- NTQ3MjUyOGM4YzU0MDQ5YTVjYmYzNzg1NmM4OWMxNzE5OGYwNTk5ZmU3ZDJl
14
- ZWEzYWJjMTMwNTFjZWFkMWJlMGFjOWUwZjJkNWIzOGIzMzUyMmVhN2Q0NDQ3
15
- YjVkYmRlMGE1ZTI0NTBiNGFlZGVkMzE1YjFmNjE0OGY0Y2Y1MTU=
13
+ YmZhYTJlNDE2ZTQxNWY3YTNjMTY0NTJiNmM5ZGJlZDIyNWI0ZDU2NmQ1YzQ1
14
+ YjBlMTAyMDQ5ZTRhZTg1YjBmNDUzOTQ3MzRkMDY3MGM0MzcyMTc2MmFhNWNi
15
+ MjgwYWU4ZTM0MjVkNjZhMTkzMTY2ZDRjMGNkNzhhNTkyMWE3MmE=
@@ -15,7 +15,7 @@ module Imogen
15
15
  h = img.height
16
16
  dims = (w > h) ? [scale, scale*h/w] : [scale*w/h, scale]
17
17
  img.rescale(dims[0], dims[1]) do |scaled|
18
- scaled = scaled.convert_to_24bits
18
+ scaled = (scaled.color_type == :rgb) ? scaled.convert_to_24bits : scaled.convert_to_8bits
19
19
  dst = FreeImage::File.new(dest_path)
20
20
  dst.save(scaled, format)
21
21
  scaled.free
@@ -7,8 +7,8 @@ module Imogen
7
7
  edges = frame.get(scale)
8
8
  img.copy(*edges) do |crop|
9
9
  crop.rescale(scale, scale) do |thumb|
10
- t24 = thumb.convert_to_24bits
11
10
  dst = FreeImage::File.new(dest_path)
11
+ t24 = (crop.color_type == :rgb) ? thumb.convert_to_24bits : thumb.convert_to_8bits
12
12
  dst.save(t24, format)
13
13
  t24.free
14
14
  thumb.free
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imogen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Armintor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-28 00:00:00.000000000 Z
11
+ date: 2014-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-opencv