local-fastimage_resize 3.4.1 → 3.5.0
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/.github/workflows/run_tests.yml +40 -0
- data/CHANGELOG.md +5 -0
- data/Dockerfile +0 -0
- data/README.md +1 -4
- data/docker-compose.yml +0 -0
- data/ext/fastimage_native_resize/fastimage_native_resize.c +5 -1
- data/lib/fastimage/resize/version.rb +1 -1
- data/lib/fastimage/resize.rb +2 -2
- metadata +6 -8
- data/.travis.yml +0 -18
- data/VERSION.yml +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 243e8ce180a53059cba215f6a4b1457034bb5706045b476004f014221f6d86dc
|
|
4
|
+
data.tar.gz: d678da3e9f07dfc24a6a8ce7d7bb88ec87b34389d55b3ce33ba4942a9d39d3f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c18538a4743a66a9a400a95a0475a4ebbee1804d499989669525b16318fc26ffa72a8ba8cce51dcce4dac77b56b7ba4a0ad9a52ff133d3eaa865fe9adb98dff6
|
|
7
|
+
data.tar.gz: 48283a7eeb579649a3ea7ca4a792956c9720a99e292570b8818f8e45b64b8ad9acf4786570adb80bdf5d8d838c0f12fd37547b0a7fdcad9af9dcd86449dc9403
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Tests
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ master ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
|
|
12
|
+
runs-on: ubuntu-24.04
|
|
13
|
+
|
|
14
|
+
# Debian images match the libgd our servers run. Ubuntu's libgd fails to
|
|
15
|
+
# read TIFF images with libtiff >= 4.5.1.
|
|
16
|
+
container: ruby:${{ matrix.image }}
|
|
17
|
+
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
image: ['3.4-trixie', '3.3-trixie', '3.1-bookworm', '2.7-bullseye']
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v7
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
# releases past their end of life are only available from archive.debian.org
|
|
27
|
+
if ! (apt-get update && apt-get -y install libgd-dev); then
|
|
28
|
+
. /etc/os-release
|
|
29
|
+
cat > /etc/apt/sources.list <<EOF
|
|
30
|
+
deb http://archive.debian.org/debian $VERSION_CODENAME main
|
|
31
|
+
deb http://archive.debian.org/debian-security $VERSION_CODENAME-security main
|
|
32
|
+
EOF
|
|
33
|
+
rm -f /etc/apt/sources.list.d/*
|
|
34
|
+
apt-get update
|
|
35
|
+
apt-get -y install libgd-dev
|
|
36
|
+
fi
|
|
37
|
+
- name: Install Ruby dependencies
|
|
38
|
+
run: bundle install
|
|
39
|
+
- name: Run tests
|
|
40
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/Dockerfile
ADDED
|
File without changes
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Local FastImage Resize
|
|
1
|
+
# Local FastImage Resize 
|
|
2
2
|
|
|
3
3
|
This is a fork of the [FastImage
|
|
4
4
|
Resize](https://github.com/sdsykes/fastimage_resize) gem.
|
|
@@ -10,9 +10,6 @@ It features the following differences:
|
|
|
10
10
|
* Support for Exif orientation
|
|
11
11
|
* Minor changes to code organization
|
|
12
12
|
|
|
13
|
-
[](https://travis-ci.org/planio-gmbh/local-fastimage_resize)
|
|
15
|
-
|
|
16
13
|
## Installation
|
|
17
14
|
|
|
18
15
|
Add this line to your application's Gemfile:
|
data/docker-compose.yml
ADDED
|
File without changes
|
|
@@ -54,6 +54,8 @@ static VALUE fastimage_native_resize(
|
|
|
54
54
|
break;
|
|
55
55
|
case 3: im_in = gdImageCreateFromTiff(in);
|
|
56
56
|
break;
|
|
57
|
+
case 4: im_in = gdImageCreateFromWebp(in);
|
|
58
|
+
break;
|
|
57
59
|
default:
|
|
58
60
|
fclose(in);
|
|
59
61
|
rb_raise(rb_eArgError, "Unsupported image type: %d", image_type);
|
|
@@ -118,7 +120,7 @@ static VALUE fastimage_native_resize(
|
|
|
118
120
|
rb_raise(rb_eRuntimeError, "Failed to create output image buffer");
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
if (image_type == 1) {
|
|
123
|
+
if (image_type == 1 || image_type == 4) {
|
|
122
124
|
gdImageAlphaBlending(im_out, 0); /* handle transparency correctly */
|
|
123
125
|
gdImageSaveAlpha(im_out, 1);
|
|
124
126
|
}
|
|
@@ -148,6 +150,8 @@ static VALUE fastimage_native_resize(
|
|
|
148
150
|
break;
|
|
149
151
|
case 3: gdImagePng(im_out, out);
|
|
150
152
|
break;
|
|
153
|
+
case 4: gdImageWebp(im_out, out);
|
|
154
|
+
break;
|
|
151
155
|
}
|
|
152
156
|
fclose(out);
|
|
153
157
|
|
data/lib/fastimage/resize.rb
CHANGED
|
@@ -26,8 +26,8 @@ require 'fastimage'
|
|
|
26
26
|
require 'fastimage_native_resize'
|
|
27
27
|
|
|
28
28
|
module FastImage::Resize
|
|
29
|
-
SUPPORTED_FORMATS = [:jpeg, :png, :gif, :tiff]
|
|
30
|
-
FILE_EXTENSIONS = [:jpg, :png, :gif, :tiff] # prefer jpg to jpeg as an extension
|
|
29
|
+
SUPPORTED_FORMATS = [:jpeg, :png, :gif, :tiff, :webp]
|
|
30
|
+
FILE_EXTENSIONS = [:jpg, :png, :gif, :tiff, :webp] # prefer jpg to jpeg as an extension
|
|
31
31
|
|
|
32
32
|
class FormatNotSupported < FastImage::FastImageException # :nodoc:
|
|
33
33
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: local-fastimage_resize
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen Sykes
|
|
8
8
|
- Gregor Schmidt (Planio)
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: local-fastimage
|
|
@@ -92,15 +91,16 @@ extensions:
|
|
|
92
91
|
- ext/fastimage_native_resize/extconf.rb
|
|
93
92
|
extra_rdoc_files: []
|
|
94
93
|
files:
|
|
94
|
+
- ".github/workflows/run_tests.yml"
|
|
95
95
|
- ".gitignore"
|
|
96
|
-
- ".travis.yml"
|
|
97
96
|
- CHANGELOG.md
|
|
97
|
+
- Dockerfile
|
|
98
98
|
- Gemfile
|
|
99
99
|
- MIT_LICENCE
|
|
100
100
|
- README.md
|
|
101
101
|
- README.textile
|
|
102
102
|
- Rakefile
|
|
103
|
-
-
|
|
103
|
+
- docker-compose.yml
|
|
104
104
|
- ext/fastimage_native_resize/extconf.rb
|
|
105
105
|
- ext/fastimage_native_resize/fastimage_native_resize.c
|
|
106
106
|
- lib/fastimage/resize.rb
|
|
@@ -110,7 +110,6 @@ homepage: http://github.com/planio-gmbh/local-fastimage_resize
|
|
|
110
110
|
licenses:
|
|
111
111
|
- MIT
|
|
112
112
|
metadata: {}
|
|
113
|
-
post_install_message:
|
|
114
113
|
rdoc_options: []
|
|
115
114
|
require_paths:
|
|
116
115
|
- lib
|
|
@@ -126,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
126
125
|
version: '0'
|
|
127
126
|
requirements:
|
|
128
127
|
- libgd, see www.libgd.org
|
|
129
|
-
rubygems_version:
|
|
130
|
-
signing_key:
|
|
128
|
+
rubygems_version: 4.0.1
|
|
131
129
|
specification_version: 4
|
|
132
130
|
summary: Local FastImage Resize - Image resizing fast and simple
|
|
133
131
|
test_files: []
|
data/.travis.yml
DELETED