carrierwave-processing 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +1 -0
- data/lib/carrierwave-processing/mini_magick.rb +19 -0
- data/lib/carrierwave-processing/rmagick.rb +19 -0
- data/lib/carrierwave-processing/version.rb +1 -1
- metadata +9 -13
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5c9a94a24df430088e2085fe3bedcea17277689e
|
4
|
+
data.tar.gz: 1c356228b5cb59e6abf9415ec87d1bcd05cad95d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5ed8e1b6e403b9b4587df8404294144864e901ccf17768a2160395d8703e6bbf8d59db5bc55e18ce5243a7bf597cb7ad5f39a73b6bcb29544ea853b86bbb7893
|
7
|
+
data.tar.gz: d52906ce12f210314eccaed7ee3302e14371ee9c6cc8a5c2dfef6d3ca52366e4925cebe46b7331a5e6a3ba274bdd1267947387383e6d01649fc04f80561b82c5
|
data/README.md
CHANGED
@@ -29,6 +29,7 @@ To use those, you should include specified module (RMagick or MiniMagick) into y
|
|
29
29
|
process :resize_to_fill => [200, 200]
|
30
30
|
process :quality => 90 # Set JPEG/MIFF/PNG compression level (0-100)
|
31
31
|
process :convert => 'png'
|
32
|
+
process :colorspace => :rgb # Set colorspace to rgb or cmyk
|
32
33
|
|
33
34
|
def filename
|
34
35
|
super.chomp(File.extname(super)) + '.png'
|
@@ -18,6 +18,25 @@ module CarrierWave
|
|
18
18
|
img
|
19
19
|
end
|
20
20
|
end
|
21
|
+
|
22
|
+
# Sets the colorspace of the image to the specified value.
|
23
|
+
#
|
24
|
+
# process :rgb # force rgb
|
25
|
+
# process :cmyk # force cmyk
|
26
|
+
#
|
27
|
+
def colorspace(cs)
|
28
|
+
manipulate! do |img|
|
29
|
+
case cs.to_sym
|
30
|
+
when :rgb
|
31
|
+
img.colorspace = "RGBColorspace"
|
32
|
+
when :cmyk
|
33
|
+
img.colorspace = "CMYKColorspace"
|
34
|
+
end
|
35
|
+
img = yield(img) if block_given?
|
36
|
+
img
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
21
40
|
end
|
22
41
|
end
|
23
42
|
end
|
@@ -18,6 +18,25 @@ module CarrierWave
|
|
18
18
|
img
|
19
19
|
end
|
20
20
|
end
|
21
|
+
|
22
|
+
# Sets the colorspace of the image to the specified value.
|
23
|
+
#
|
24
|
+
# process :rgb # force rgb
|
25
|
+
# process :cmyk # force cmyk
|
26
|
+
#
|
27
|
+
def colorspace(cs)
|
28
|
+
manipulate! do |img|
|
29
|
+
case cs.to_sym
|
30
|
+
when :rgb
|
31
|
+
img.colorspace = Magick::RGBColorspace
|
32
|
+
when :cmyk
|
33
|
+
img.colorspace = Magick::CMYKColorspace
|
34
|
+
end
|
35
|
+
img = yield(img) if block_given?
|
36
|
+
img
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
21
40
|
end
|
22
41
|
end
|
23
42
|
end
|
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-processing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Pavel Forkert
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-05-14 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: carrierwave
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
description: Additional processing support for MiniMagick and RMagick
|
@@ -46,26 +43,25 @@ files:
|
|
46
43
|
- lib/carrierwave-processing/version.rb
|
47
44
|
homepage: https://github.com/fxposter/carrierwave-processing
|
48
45
|
licenses: []
|
46
|
+
metadata: {}
|
49
47
|
post_install_message:
|
50
48
|
rdoc_options: []
|
51
49
|
require_paths:
|
52
50
|
- lib
|
53
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
52
|
requirements:
|
56
|
-
- -
|
53
|
+
- - '>='
|
57
54
|
- !ruby/object:Gem::Version
|
58
55
|
version: '0'
|
59
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
57
|
requirements:
|
62
|
-
- -
|
58
|
+
- - '>='
|
63
59
|
- !ruby/object:Gem::Version
|
64
60
|
version: '0'
|
65
61
|
requirements: []
|
66
62
|
rubyforge_project:
|
67
|
-
rubygems_version:
|
63
|
+
rubygems_version: 2.0.3
|
68
64
|
signing_key:
|
69
|
-
specification_version:
|
65
|
+
specification_version: 4
|
70
66
|
summary: Additional processing support for MiniMagick and RMagick
|
71
67
|
test_files: []
|