jr-paperclip 8.0.0 → 8.0.1
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/NEWS +7 -0
- data/VIPS_MIGRATION_GUIDE.md +16 -14
- data/lib/paperclip/thumbnail.rb +7 -0
- data/lib/paperclip/version.rb +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: 50f7b552819fd770fc0efc3724f496f5a4bc10f8d4ac6fe9bc0591eeeceb57af
|
|
4
|
+
data.tar.gz: c3feece4b2623116fe6eb3816133a84b0115231dfec1709cecb72fc66269f442
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d6ccee68da6e052ff437398bee524ef8243e23cae44ffecb2e277240dd710a5a0b06927638caab4c720920e90d628284f8df8a20d6674dedde46478ecec9c57
|
|
7
|
+
data.tar.gz: 48ccea235059d3d732e1353c718e204c90a73ee10b9e37c79edda4b651c64ff0cff81a57dbf11af77aa724ee871868dad6555b15563c5cd2d5470675c7987e85
|
data/NEWS
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
8.0.1 (2026-01-19)
|
|
2
|
+
|
|
3
|
+
* Performance: Vips backend now uses sequential access by default for better memory efficiency.
|
|
4
|
+
Sequential access streams images from top to bottom, keeping only a few scanlines in memory
|
|
5
|
+
rather than loading the entire image. This significantly reduces memory usage for large images.
|
|
6
|
+
Users can override via source_file_options: { access: :random } if needed.
|
|
7
|
+
|
|
1
8
|
8.0.0 (2026-01-13)
|
|
2
9
|
|
|
3
10
|
* Feature: Add libvips backend alongside ImageMagick via the image_processing gem
|
data/VIPS_MIGRATION_GUIDE.md
CHANGED
|
@@ -51,20 +51,22 @@ Good news! Many common `convert_options` now work with **both** ImageMagick and
|
|
|
51
51
|
|
|
52
52
|
### Options That Work on Both Backends
|
|
53
53
|
|
|
54
|
-
| Option | Description |
|
|
55
|
-
|
|
56
|
-
| `-strip` | Remove metadata/EXIF
|
|
57
|
-
| `-quality N` | Output quality (1-100) |
|
|
58
|
-
| `-rotate N` | Rotate by degrees |
|
|
59
|
-
| `-flip` | Vertical flip |
|
|
60
|
-
| `-flop` | Horizontal flip |
|
|
61
|
-
| `-blur 0xN` | Gaussian blur |
|
|
62
|
-
| `-sharpen 0xN` | Sharpen image |
|
|
63
|
-
| `-colorspace X` | Color space (Gray, sRGB, CMYK) |
|
|
64
|
-
| `-negate` | Invert colors |
|
|
65
|
-
| `-flatten` | Flatten transparency |
|
|
66
|
-
| `-
|
|
67
|
-
| `-
|
|
54
|
+
| Option | Description | Example |
|
|
55
|
+
|--------|-------------|---------|
|
|
56
|
+
| `-strip` | Remove metadata/EXIF | `convert_options: "-strip"` |
|
|
57
|
+
| `-quality N` | Output quality (1-100) | `convert_options: "-quality 80"` |
|
|
58
|
+
| `-rotate N` | Rotate by degrees | `convert_options: "-rotate 90"` |
|
|
59
|
+
| `-flip` | Vertical flip | `convert_options: "-flip"` |
|
|
60
|
+
| `-flop` | Horizontal flip | `convert_options: "-flop"` |
|
|
61
|
+
| `-blur 0xN` | Gaussian blur | `convert_options: "-blur 0x2"` |
|
|
62
|
+
| `-sharpen 0xN` | Sharpen image | `convert_options: "-sharpen 0x1"` |
|
|
63
|
+
| `-colorspace X` | Color space (Gray, sRGB, CMYK) | `convert_options: "-colorspace Gray"` |
|
|
64
|
+
| `-negate` | Invert colors | `convert_options: "-negate"` |
|
|
65
|
+
| `-flatten` | Flatten transparency | `convert_options: "-flatten"` |
|
|
66
|
+
| `-gamma N` | Adjust image gamma | `convert_options: "-gamma 1.5"` |
|
|
67
|
+
| `-auto-orient` | Auto-rotate via EXIF | `convert_options: "-auto-orient"` |
|
|
68
|
+
| `-interlace X` | Progressive output | `convert_options: "-interlace Plane"` |
|
|
69
|
+
|
|
68
70
|
|
|
69
71
|
**Example:**
|
|
70
72
|
```ruby
|
data/lib/paperclip/thumbnail.rb
CHANGED
|
@@ -183,6 +183,13 @@ module Paperclip
|
|
|
183
183
|
def build_pipeline(source_path)
|
|
184
184
|
pipeline = image_processing_module.source(source_path)
|
|
185
185
|
|
|
186
|
+
# For vips backend, default to sequential access for better memory efficiency.
|
|
187
|
+
# Sequential access streams the image from top to bottom, keeping only a few
|
|
188
|
+
# scanlines in memory. Users can override via source_file_options: { access: :random }
|
|
189
|
+
if backend == :vips
|
|
190
|
+
pipeline = pipeline.loader(access: :sequential)
|
|
191
|
+
end
|
|
192
|
+
|
|
186
193
|
# Handle source file options
|
|
187
194
|
if @source_file_options
|
|
188
195
|
loader_options = parse_loader_options(@source_file_options)
|
data/lib/paperclip/version.rb
CHANGED