mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-08-05 08:22:49 +02:00
🐛 — AVIF format support (fix #137)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
Revision history for Lutim
|
||||
|
||||
0.17.0 ????-??-??
|
||||
- 🐛 — AVIF format support
|
||||
|
||||
0.16.0 2023-12-29
|
||||
- ⬆️ UUpdate jQuery
|
||||
- ⬆️ Update jQuery
|
||||
- 💥 BREAKING CHANGE: no more twitter cards
|
||||
- 🎨 — Use template literals in js
|
||||
- 🐛 — Gallery, zip and random URLs are now updated when closing image dialog box
|
||||
|
||||
@@ -416,7 +416,9 @@ sub add {
|
||||
my $path = 'files/'.$record->short.'.'.$ext;
|
||||
|
||||
my ($width, $height);
|
||||
if ($im_loaded && $mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') { # ImageMagick don't work in Debian with svg (for now?)
|
||||
if ($im_loaded && $mediatype ne 'image/svg+xml' # ImageMagick doesn't work with SVG, xcf or avif files
|
||||
&& $mediatype !~ m#image/(x-)?xcf#
|
||||
&& $mediatype ne 'image/avif') {
|
||||
my $im = Image::Magick->new;
|
||||
$im->BlobToImage($upload->slurp);
|
||||
|
||||
@@ -484,7 +486,9 @@ sub add {
|
||||
}
|
||||
|
||||
unless (defined($keep_exif) && $keep_exif) {
|
||||
if ($mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') {
|
||||
# Exiftool can’t process SVG or xcf files
|
||||
if ($mediatype ne 'image/svg+xml'
|
||||
&& $mediatype !~ m#image/(x-)?xcf#) {
|
||||
# Remove the EXIF tags
|
||||
my $data = new IO::Scalar \$upload->slurp();
|
||||
my $et = Image::ExifTool->new;
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lutim-file"><%= l('Send an image') %></label>
|
||||
<input type="file" name="file" id="lutim-file" accept="image/*">
|
||||
<input type="file" name="file" id="lutim-file" accept="image/*,image/avif">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lutim-file-url"><%= l('Upload an image with its URL') %></label>
|
||||
@@ -228,7 +228,7 @@
|
||||
<div class="browser">
|
||||
<label>
|
||||
<span><%= l('Click to open the file browser') %></span>
|
||||
<input type="file" name="files[]" multiple="multiple" title='<%= l('Click to open the file browser') %>' accept="image/*">
|
||||
<input type="file" name="files[]" multiple="multiple" title='<%= l('Click to open the file browser') %>' accept="image/*,image/avif">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lutim-file"><%= l('Send an image') %></label>
|
||||
<input type="file" name="file" id="lutim-file" accept="image/*">
|
||||
<input type="file" name="file" id="lutim-file" accept="image/*,image/avif">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lutim-file-url"><%= l('Upload an image with its URL') %></label>
|
||||
@@ -231,7 +231,7 @@
|
||||
<div class="browser">
|
||||
<label class="btn">
|
||||
<span><%= l('Click to open the file browser') %></span>
|
||||
<input type="file" name="files[]" multiple="multiple" title='<%= l('Click to open the file browser') %>' accept="image/*">
|
||||
<input type="file" name="files[]" multiple="multiple" title='<%= l('Click to open the file browser') %>' accept="image/*,image/avif">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user