malmal 0.5.0-aarch64-linux-gnu → 0.5.1-aarch64-linux-gnu
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 +4 -4
- data/README.md +1 -1
- data/lib/malmal/libmalmal_ffi.so +0 -0
- data/lib/malmal/scanner.rb +3 -3
- data/lib/malmal/version.rb +1 -1
- data/sig/malmal.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f1f1e6db2fe0a38b7a88fcb69e5d042a9f23c171da99188a9591639f0b6e88f
|
|
4
|
+
data.tar.gz: d059daae3ef2654bae05f1992529d07fe59c9ae6eb067c5ba7c2eb4e1bd0dac8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 300a8a334fbc402f99fae39208aed114862927b8ee4a8f08b13303ef2a842447933eabad9fb2b09cbbd203787609b8fb2e283ee772d0c8d938fe27a99e51b4da
|
|
7
|
+
data.tar.gz: a8d4969605668399441d10fedd15555feec7949ccb9aea2565a878665de5e8d3c5be824497caacba7d6890fd9901248347e16ad162ebad892761245a9b7e0f94
|
data/README.md
CHANGED
|
@@ -88,7 +88,7 @@ end
|
|
|
88
88
|
|
|
89
89
|
The type can change: a BMP, TIFF or PSD comes out as a PNG. `Malmal::Sanitized` has
|
|
90
90
|
`data`, `file_type`, `content_type`, `extension`, `width`, `height`, `frames` and
|
|
91
|
-
`report`. `sanitize` also takes `types`, `keep_cmyk`, `keep_profile`, `pdf_dpi`, `pdf_jpeg`, `pdf_text` and
|
|
91
|
+
`report`. `sanitize` also takes `types`, `keep_cmyk`, `keep_profile`, `tone_map`, `pdf_dpi`, `pdf_jpeg`, `pdf_text` and
|
|
92
92
|
`pdf_vector_text`; PDFs are rebuilt only by a library built with `cdr-pdf`. Both
|
|
93
93
|
exceptions are a `Malmal::SanitizeError`.
|
|
94
94
|
|
data/lib/malmal/libmalmal_ffi.so
CHANGED
|
Binary file
|
data/lib/malmal/scanner.rb
CHANGED
|
@@ -12,7 +12,7 @@ module Malmal
|
|
|
12
12
|
class Scanner
|
|
13
13
|
POLICIES = %i[default strict documents].freeze
|
|
14
14
|
LIMITS = %i[max_size max_decompressed max_pixels max_depth scan_timeout].freeze
|
|
15
|
-
SANITIZE_OPTIONS = %i[types keep_cmyk keep_profile pdf_dpi pdf_jpeg pdf_text pdf_vector_text].freeze
|
|
15
|
+
SANITIZE_OPTIONS = %i[types keep_cmyk keep_profile tone_map pdf_dpi pdf_jpeg pdf_text pdf_vector_text].freeze
|
|
16
16
|
DEFAULT_MAX_MEMORY = 512 << 20
|
|
17
17
|
|
|
18
18
|
# The handle is freed when the scanner is collected, unless #close
|
|
@@ -90,8 +90,8 @@ module Malmal
|
|
|
90
90
|
# the upload. Raises Rejected, NotRebuilt or ScanError otherwise; in
|
|
91
91
|
# every case the upload is not to be kept.
|
|
92
92
|
#
|
|
93
|
-
# +jpeg_quality+ (1 to 100), +types+, +keep_cmyk+, +keep_profile+, +
|
|
94
|
-
# +pdf_text+ and +pdf_vector_text+ are the options of the rebuild.
|
|
93
|
+
# +jpeg_quality+ (1 to 100), +types+, +keep_cmyk+, +keep_profile+, +tone_map+, +pdf_dpi+,
|
|
94
|
+
# +pdf_jpeg+, +pdf_text+ and +pdf_vector_text+ are the options of the rebuild.
|
|
95
95
|
def sanitize(data, filename: nil, content_type: nil, jpeg_quality: nil, **options)
|
|
96
96
|
unknown = options.keys - SANITIZE_OPTIONS
|
|
97
97
|
raise ArgumentError, "unknown option #{unknown.first.inspect}" unless unknown.empty?
|
data/lib/malmal/version.rb
CHANGED
data/sig/malmal.rbs
CHANGED
|
@@ -81,7 +81,7 @@ module Malmal
|
|
|
81
81
|
?max_pixels: Integer, ?max_depth: Integer, ?scan_timeout: Numeric) -> void
|
|
82
82
|
def scan: (input data, ?filename: String?, ?content_type: String?) -> Report
|
|
83
83
|
def sanitize: (input data, ?filename: String?, ?content_type: String?, ?jpeg_quality: Integer?,
|
|
84
|
-
?types: Array[Symbol | String], ?keep_cmyk: bool, ?keep_profile: bool, ?pdf_dpi: Integer, ?pdf_jpeg: bool, ?pdf_text: bool,
|
|
84
|
+
?types: Array[Symbol | String], ?keep_cmyk: bool, ?keep_profile: bool, ?tone_map: bool, ?pdf_dpi: Integer, ?pdf_jpeg: bool, ?pdf_text: bool,
|
|
85
85
|
?pdf_vector_text: bool) -> Sanitized
|
|
86
86
|
def overdue: () -> Integer
|
|
87
87
|
def library_version: () -> String
|