Skip to content

Commit

Permalink
Version 6.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Jun 6, 2023
1 parent 886534b commit 0147e0a
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For more information, go to https://www.luigifab.fr/apijs and https://www.luigif

This repository is a releases mirror. To install the plugin, please read the documentation.

- Current version: 6.9.3 (01/01/2023)
- Current version: 6.9.4 (06/06/2023)
- Compatibility: Redmine 1.4 / 2.x / 3.x / 4.x / 5.x, Python 3.3+
- Client compatibility: Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+
- Translations: English (en), French (fr-FR/fr-CA), German (de), Italian (it), Portuguese (pt-PT/pt-BR), Spanish (es) / Chinese (zh), Czech (cs), Dutch (nl), Greek (el), Hungarian (hu), Japanese (ja), Polish (pl), Romanian (ro), Russian (ru), Slovak (sk), Turkish (tr), Ukrainian (uk)
Expand Down
4 changes: 2 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
redmine-plugin-apijs (6.9.3-1) experimental; urgency=low
redmine-plugin-apijs (6.9.4-1) experimental; urgency=low

* Initial Debian package release (Closes: #959426)

-- Fabrice Creuzot <code@luigifab.fr> Sun, 01 Jan 2023 20:00:00 +0000
-- Fabrice Creuzot <code@luigifab.fr> Tue, 06 Jun 2023 20:00:00 +0000
4 changes: 2 additions & 2 deletions debian/deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


cd "$(dirname "$0")"
version="6.9.3"
version="6.9.4"


rm -rf builder/
Expand Down Expand Up @@ -31,7 +31,7 @@ fi


# create packages for Debian and Ubuntu
for serie in experimental kinetic jammy focal bionic xenial trusty; do
for serie in experimental mantic lunar kinetic jammy focal bionic xenial trusty; do

if [ $serie = "experimental" ]; then
# for Ubuntu
Expand Down
5 changes: 4 additions & 1 deletion opensuse/redmine-apijs.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%define basedir /srv/www/vhosts/redmine/
%define plugin_name redmine_apijs
Name: redmine-apijs
Version: 6.9.3
Version: 6.9.4
Release: 0
Summary: Plugin for Redmine to display a gallery from attachments
Summary(fr): Extension pour Redmine pour afficher une galerie à partir des pièces jointes
Expand Down Expand Up @@ -66,6 +66,9 @@ chmod +x %{buildroot}%{basedir}/plugins/%{plugin_name}/lib/*.py


%changelog
* Tue Jun 06 2023 Fabrice Creuzot <code@luigifab.fr> - 6.9.4-1
- New upstream release

* Sun Jan 01 2023 Fabrice Creuzot <code@luigifab.fr> - 6.9.3-1
- New upstream release

Expand Down
2 changes: 1 addition & 1 deletion opensuse/rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


cd "$(dirname "$0")"
version="6.9.3"
version="6.9.4"


rm -rf builder/
Expand Down
2 changes: 1 addition & 1 deletion rubygem/gem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


cd "$(dirname "$0")"
version="6.9.3"
version="6.9.4"
rm -rf builder/


Expand Down
4 changes: 2 additions & 2 deletions src/assets/javascripts/apijs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/javascripts/apijs.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/stylesheets/apijs-print.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/assets/stylesheets/apijs-print.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/assets/stylesheets/apijs-screen-rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/assets/stylesheets/apijs-screen-rtl.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/stylesheets/apijs-screen.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/assets/stylesheets/apijs-screen.min.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/init.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: utf-8
# Created L/21/05/2012
# Updated J/22/12/2022
# Updated L/24/04/2023
#
# Copyright 2008-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
# https://github.com/luigifab/redmine-apijs
Expand Down Expand Up @@ -46,7 +46,7 @@
name 'Redmine Apijs plugin'
author 'Fabrice Creuzot'
description 'Integrate the apijs JavaScript library into Redmine. Provides a gallery for image and video attachments.'
version '6.9.3'
version '6.9.4'
url 'https://www.luigifab.fr/redmine/apijs'
author_url 'https://www.luigifab.fr/'

Expand Down
16 changes: 8 additions & 8 deletions src/lib/image.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/python3
# -*- coding: utf8 -*-
# Created J/26/12/2013
# Updated S/30/07/2022
# Updated M/23/05/2023
#
# Copyright 2008-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
# Copyright 2020-2023 | Fabrice Creuzot <fabrice~cellublue~com>
# https://github.com/luigifab/openmage-apijs
# https://github.com/luigifab/redmine-apijs https://github.com/luigifab/openmage-apijs
#
# This program is free software, you can redistribute it or modify
# it under the terms of the GNU General Public License (GPL) as published
Expand All @@ -26,7 +26,7 @@
quality = int(sys.argv[5]) if len(sys.argv) >= 6 else 0
fixed = len(sys.argv) >= 7 and sys.argv[6] == 'fixed'
except:
print("Usage: image.py source_file destination_file width_px height_px [quality=0:auto..100] [fixed]")
print("Usage: image.py source_file destination_file width_px height_px [quality=0:auto..100 or 0:auto..9 for png] [fixed]")
print("source: all supported format by python-pil (including animated gif/png/webp),")
print(" or all supported format by ffmpegthumbnailer,")
print(" or svg")
Expand Down Expand Up @@ -61,6 +61,7 @@ def calcSize(source, size):

def createThumb(source, size, fixed, new=False):

# https://pillow.readthedocs.io/en/latest/releasenotes/9.1.0.html
# https://pillow.readthedocs.io/en/latest/releasenotes/7.0.0.html?highlight=thumbnail (reducing_gap)
# https://pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.Image.thumbnail
# https://pillow.readthedocs.io/en/latest/handbook/concepts.html#filters-comparison-table
Expand Down Expand Up @@ -116,7 +117,7 @@ def hasTransparency(img):


# Animated resizing
# based on https://stackoverflow.com/a/41827681/2980105
# https://stackoverflow.com/a/41827681/2980105
def resizeAnimatedGif(source, size, fixed):

# Animated GIF resizing
Expand Down Expand Up @@ -193,7 +194,6 @@ def resizeAnimatedWebp(source, size, fixed):

# File saving
# https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html
# todo: source.info.get('loop')=None
def saveGif(dest, fileout, quality):

try:
Expand All @@ -216,12 +216,12 @@ def savePng(dest, fileout, quality):

try:
if len(dest) == 1:
dest[0].save(fileout, 'PNG', optimize=True, compress_level=9)
dest[0].save(fileout, 'PNG', optimize=True, compress_level=quality)
else:
dest[0].save(fileout, 'PNG', optimize=True, compress_level=9, save_all=True, append_images=dest[1:],
dest[0].save(fileout, 'PNG', optimize=True, compress_level=quality, save_all=True, append_images=dest[1:],
loop=0, duration=source.info.get('duration'))
except:
dest.save(fileout, 'PNG', optimize=True, compress_level=9)
dest.save(fileout, 'PNG', optimize=True, compress_level=quality)

def saveWebp(dest, fileout, quality):

Expand Down

0 comments on commit 0147e0a

Please sign in to comment.