Commit Graph

21 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
4543ab1ff0
tests: skip the other img converter test too
if qubes-img-converter is not installed
2018-10-26 01:44:24 +02:00
Marek Marczykowski-Górecki
4bfd10baaa
imgconverter: allow icons up to 2048x2048
Recently some applications ships with large icons like 1024x1024
(Signal-desktop for example). To not degrade any fancy HiDPI 8K
experience, allow for that, instead of downscaling.
The max icon size is only anti-DoS protection anyway.
2018-10-17 05:27:27 +02:00
Marek Marczykowski-Górecki
0255f4d843
tests: skip img converter test if qubes-img-converter is not installed 2018-10-16 22:13:46 +02:00
Marek Marczykowski-Górecki
2b1f8931a6
tests: integration tests for qvm-convert-img
Actual tool is in separate repository, but the backend module is here.
Also, other tests for imgconverter are already here.

QubesOS/qubes-issues#3085
2017-12-22 16:47:06 +01:00
Marek Marczykowski-Górecki
34e3c3acf3
imgconverter: fix handling explicit file type
Fix handling source filename as 'type:path' - get parts, not try to
extract only the first one.

Related QubesOS/qubes-issues#3085
2017-12-22 03:49:44 +01:00
Marek Marczykowski-Górecki
20be8e2417
Make tests python3 compatible 2017-12-21 20:11:11 +01:00
Marek Marczykowski-Górecki
2ac5c03bb3
Update tests 2017-12-21 19:44:46 +01:00
Marek Marczykowski-Górecki
3e41a2987c
imgconverter: fix make_padlock function
hex_to_float is gone, use hex_to_int instead

Fixes QubesOS/qubes-issues#3331
2017-12-21 19:12:55 +01:00
Marek Marczykowski-Górecki
6cb980f5be
Add missing classmethod decorator 2017-11-21 05:34:01 +01:00
qubesuser
ee58088dec replace tinting algorithm with one that partially preserves saturation too
This algorithm partially preserves saturation, for a  better result, but
enforces a minimum chroma, so that greyscale images get tinted.
2017-11-08 18:57:22 +01:00
qubesuser
843ac6c477 reimplement tint algorithm with numpy for reasonable performance
The old algorithm was so slow it would take seconds to tint all images
for a VM.
2017-11-08 18:57:22 +01:00
qubesuser
86e9231ac9 use PIL image library instead of ImageMagick to load/save images when tinting 2017-11-08 18:57:22 +01:00
qubesuser
f893420871 remove unused cairo import 2017-11-08 17:45:21 +01:00
Jean-Philippe Ouellet
349f79bc66
Fix off-by-one error in header length calculation
int(ceil(log10(100))) is one lower than it should be when max widths are
powers of 10. This means providing a value of 100 when the max is 100
produces an unexpected failure.

Was never triggered because imghdrlen args are only hard-coded
constants, but a bug is a bug.
2017-08-11 09:43:41 -04:00
Marek Marczykowski-Górecki
02d9a1e68f
imgconverter: use core3 API in get_from_vm() 2017-05-18 01:03:06 +02:00
Marek Marczykowski-Górecki
95805f6333
imgconverter: make it really work on python3 2017-05-18 01:03:06 +02:00
Marek Marczykowski-Górecki
6c36cb8de9
rpm: packge qubesimgconverter for both python2 and python3
And while at it, move it to separate subpackages, following Fedora
packaging guidelines.
2017-05-18 01:03:05 +02:00
Marek Marczykowski-Górecki
13b9ea7f1c
debian: fix install location of python files
Debian use /usr/lib/python*/dist-packages (instead of site-packages) for
packaged python modules. It's achieved using --install-layout=deb
option, so pass it on Debian build.
2017-04-08 13:58:34 +02:00
Marek Marczykowski-Górecki
69a3f06f99
Install python modules to /usr
On Debian python-setuptools is configured to install into /usr/local by
default.
2017-04-08 13:58:33 +02:00
Wojtek Porczyk
162e3734e5
Move imggen module from artwork. 2017-04-08 13:58:32 +02:00
Wojtek Porczyk
2a0bbe1c6f
Package imgconverter as separate Python module
This is partly because qubes/__init__.py conflicted with core3.
It is also a good practice.
2017-04-08 13:58:32 +02:00