assembly-image 1.8.0 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab0138b7a2f4b92d23428f192efd67f9db79e588849411265079c7dafbd8d44b
4
- data.tar.gz: 6d87bd7214d36684259de8d082b75494f67602947df1bfbb992ae7d4178a339c
3
+ metadata.gz: 0fee80ede73f89c00b4190c802537d9d92057958cd056b2f076c5e54294daa2a
4
+ data.tar.gz: af6b7ca6d3600a051d2403bdfb72de29ebfab3ebe2e4296529e2cd10fb98662e
5
5
  SHA512:
6
- metadata.gz: a1afdaef9ca647be48084fd50ea18adcb69383b42e5cccea155f5dbb5ed072709ca6061f0b0f352df738ff2a0a4d55388a5e2288f6fbb8eab97c166a3f5ed6f0
7
- data.tar.gz: e4310e4e33f402cefd3443173b47510ae6b1bb767be766f88edf934c802da7778866ad0e4b557254d6599a82b48f8e4f52fd50d9baf01ed0df430ad99cb8993f
6
+ metadata.gz: e380fd9bda9288ee8fabb74ab0ad7256c2623499044265b739b8bacc407f92ef97ee4102265ba2bbb414c89c9ead373c65cdc8df7726f055f524673d36322684
7
+ data.tar.gz: 7e712a8bd31dd1728a0fc3b07a78c98cdd78a98fe0a2d5d38bd2960ceb48317b60dc3f0747011cb897603bd9d72558add2d0ab322eeb7246cc31d66f090a8e31
data/README.md CHANGED
@@ -7,7 +7,9 @@
7
7
 
8
8
  ## Overview
9
9
  This gem contains classes used by the Stanford University Digital Library to
10
- perform image operations necessary for accessioning of content.
10
+ perform image operations necessary for accessioning of content.
11
+
12
+ Requires image processing software - see PreRequisites section below.
11
13
 
12
14
  ## Notes
13
15
 
@@ -1,11 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  $LOAD_PATH.push File.expand_path('lib', __dir__)
4
- require 'assembly-image/version'
5
4
 
6
5
  Gem::Specification.new do |s|
7
6
  s.name = 'assembly-image'
8
- s.version = Assembly::Image::VERSION
7
+ s.version = '1.9.0'
9
8
  s.authors = ['Peter Mangiafico', 'Renzo Sanchez-Silva', 'Monty Hindman', 'Tony Calavano']
10
9
  s.email = ['pmangiafico@stanford.edu']
11
10
  s.homepage = ''
@@ -5,10 +5,7 @@ require_relative 'jp2_creator'
5
5
 
6
6
  module Assembly
7
7
  # The Image class contains methods to operate on an image.
8
- class Image
9
- # include common behaviors from assembly-objectfile gem
10
- include Assembly::ObjectFileable
11
-
8
+ class Image < Assembly::ObjectFile
12
9
  # Examines the input image for validity. Used to determine if image is correct and if JP2 generation is likely to succeed.
13
10
  # This method is automatically called before you create a jp2 but it can be called separately earlier as a sanity check.
14
11
  #
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'assembly-objectfile'
3
4
  require 'tempfile'
4
5
  require 'English' # see https://github.com/rubocop-hq/rubocop/issues/1747 (not #MAGA related)
5
6
 
6
7
  module Assembly
7
- class Image
8
+ class Image < Assembly::ObjectFile
8
9
  # Creates jp2 derivatives
9
10
  class Jp2Creator # rubocop:disable Metrics/ClassLength
10
11
  # Create a JP2 file for the current image.
@@ -42,6 +43,7 @@ module Assembly
42
43
  create_jp2_checks
43
44
 
44
45
  # Using instance variable so that can check in tests.
46
+ # We do this because we need to reliably compress the tiff and KDUcompress doesn’t support arbitrary image types
45
47
  @tmp_path = make_tmp_tiff(tmp_folder: tmp_folder)
46
48
 
47
49
  jp2_command = jp2_create_command(source_path: @tmp_path, output: output_path)
@@ -141,6 +143,7 @@ module Assembly
141
143
  image.image_data_size >= 2**32
142
144
  end
143
145
 
146
+ # We do this because we need to reliably compress the tiff and KDUcompress doesn’t support arbitrary image types
144
147
  def make_tmp_tiff(tmp_folder: nil)
145
148
  tmp_folder ||= Dir.tmpdir
146
149
  raise "tmp_folder #{tmp_folder} does not exists" unless File.exist?(tmp_folder)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assembly-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Mangiafico
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-06-03 00:00:00.000000000 Z
14
+ date: 2022-06-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: assembly-objectfile
@@ -158,7 +158,6 @@ files:
158
158
  - lib/assembly-image/image.rb
159
159
  - lib/assembly-image/images.rb
160
160
  - lib/assembly-image/jp2_creator.rb
161
- - lib/assembly-image/version.rb
162
161
  - profiles/AdobeRGB1998.icc
163
162
  - profiles/DotGain20.icc
164
163
  - profiles/sRGBIEC6196621.icc
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Main Assembly namespace
4
- module Assembly
5
- # Main Image class
6
- class Image
7
- # Gem version
8
- VERSION = '1.8.0'
9
- end
10
- end