assembly-objectfile 1.5.5 → 1.5.6
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -60,6 +60,7 @@ content type specific operations (such as jp2 generation).
|
|
60
60
|
- 1.5.3 More gemfile updates
|
61
61
|
- 1.5.4 jp2able? method now returns true even if profile description is missing; add new method which does a check for existing color profile in an image
|
62
62
|
- 1.5.5 do not allow jp2s to have jp2s derivatives generated
|
63
|
+
- 1.5.6 do a further check for alternate existence of color profile in exif
|
63
64
|
|
64
65
|
==Usage
|
65
66
|
|
@@ -218,7 +218,7 @@ module Assembly
|
|
218
218
|
# source_img=Assembly::ObjectFile.new('/input/path_to_file.tif')
|
219
219
|
# puts source_img.has_color_profile? # gives true
|
220
220
|
def has_color_profile?
|
221
|
-
exif.nil? ? false : !exif['profiledescription'].nil? # check for existence of profile description
|
221
|
+
exif.nil? ? false : (!exif['profiledescription'].nil? || !exif['colorspace'].nil?) # check for existence of profile description
|
222
222
|
end
|
223
223
|
|
224
224
|
# Examines the input image for validity to create a jp2. Same as valid_image? but also confirms the existence of a profile description and further restricts mimetypes.
|
data/spec/object_file_spec.rb
CHANGED
@@ -53,14 +53,14 @@ describe Assembly::ObjectFile do
|
|
53
53
|
@ai.dpg_folder.should == "05"
|
54
54
|
end
|
55
55
|
|
56
|
-
it "should tell us that a jp2 file is not jp2able" do
|
56
|
+
it "should tell us that a jp2 file is not jp2able but does have a color profile" do
|
57
57
|
File.exists?(TEST_JP2_INPUT_FILE).should be true
|
58
58
|
@ai = Assembly::ObjectFile.new(TEST_JP2_INPUT_FILE)
|
59
59
|
@ai.image?.should == true
|
60
60
|
@ai.object_type.should == :image
|
61
61
|
@ai.valid_image?.should == true
|
62
62
|
@ai.jp2able?.should == false
|
63
|
-
@ai.has_color_profile?.should ==
|
63
|
+
@ai.has_color_profile?.should == true
|
64
64
|
end
|
65
65
|
|
66
66
|
it "should tell us that a tiff file is jp2able and has a color profile" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assembly-objectfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 6
|
10
|
+
version: 1.5.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Peter Mangiafico
|