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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4d043392b65693b4af9bca7adc247c1872443e906bf4c72e4e93a37da8b086e
4
- data.tar.gz: e1f0da7471e86c33faf6c790a6eabda379c2c6b7bb1029958e8afa296575a08f
3
+ metadata.gz: 243e8ce180a53059cba215f6a4b1457034bb5706045b476004f014221f6d86dc
4
+ data.tar.gz: d678da3e9f07dfc24a6a8ce7d7bb88ec87b34389d55b3ce33ba4942a9d39d3f8
5
5
  SHA512:
6
- metadata.gz: 4af1768186b8a056a5b3cacae9a7d99e2795df3d734522418636fa085c0935f9310245e7c6107b0bafb09db63987eb8421ecc76f3ab14abb3ff7522c790603e6
7
- data.tar.gz: a9a22b4b9c6639984209422ea73cb7dbcd13ddf408befb4edb95960226f3400d66cfef1e00c8f491ad44bc6f92ee9f938940fb33a10459893384d4f67dfd252d
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
@@ -1,3 +1,8 @@
1
+ # 3.5.0 - 2026-07-13
2
+
3
+ Support for resizing WebP images. The generated thumbnail is a WebP image,
4
+ preserving transparency.
5
+
1
6
  # 3.4.1 - 2025-03-04
2
7
 
3
8
  Improved error handling and memory management to fix segmentation faults that
data/Dockerfile ADDED
File without changes
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Local FastImage Resize
1
+ # Local FastImage Resize ![Build Status](https://github.com/planio-gmbh/local-fastimage_resize/actions/workflows/run_tests.yml/badge.svg)
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
- [![Build
14
- Status](https://travis-ci.org/planio-gmbh/local-fastimage_resize.svg?branch=master)](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:
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  class FastImage
4
4
  module Resize
5
- VERSION = "3.4.1"
5
+ VERSION = "3.5.0"
6
6
  end
7
7
  end
@@ -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.1
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: 2025-03-04 00:00:00.000000000 Z
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
- - VERSION.yml
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: 3.3.22
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
@@ -1,18 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.4.10
4
- - 2.5.8
5
- - 2.6.6
6
- - 2.7.2
7
- - 3.0.0
8
-
9
- before_install:
10
- - gem install bundler
11
-
12
- cache: bundler
13
- sudo: false
14
-
15
- addons:
16
- apt:
17
- packages:
18
- - libgd2-noxpm-dev
data/VERSION.yml DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- :patch: 3
3
- :major: 2
4
- :build:
5
- :minor: 0