Package Details: trimage 1.0.6-2

Git Clone URL: https://aur.archlinux.org/trimage.git (read-only, click to copy)
Package Base: trimage
Description: A GUI based lossless image compressor.
Upstream URL: http://trimage.org
Licenses: custom:MIT
Submitter: Francois_B
Maintainer: Stunkymonkey
Last Packager: Stunkymonkey
Votes: 22
Popularity: 0.000000
First Submitted: 2016-05-16 06:58 (UTC)
Last Updated: 2020-03-19 12:21 (UTC)

Latest Comments

Stunkymonkey commented on 2025-01-20 22:44 (UTC)

@trinitronx i guess you already reported upstream, due to your comment here: https://github.com/Kilian/Trimage/issues/78#issuecomment-2597540673

You are right, that this should be resolved upstream.

trinitronx commented on 2025-01-17 00:49 (UTC)

Seems to be a bit broken on python3.13 when using the GUI or passing a single file with: trimage -f /tmp/test.png

Warning: versions are different between png.h and png.c
  png.h version: 1.6.37
  png.c version: 1.6.44

 pngcrush 1.8.13, uses libpng 1.6.37 and zlib 1.2.11
 Check http://pmt.sf.net/
 for the most recent version.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 90, in execute
    return_value = self.callable(*self.arguments) #IGNORE:W0142
  File "/usr/lib/python3.13/site-packages/trimage/trimage.py", line 381, in compress
    copy(self.fullpath, backupfullpath)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/shutil.py", line 428, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/shutil.py", line 240, in copyfile
    raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: '/tmp/test.png' and '/tmp/test.png' are the same file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 131, in run
    job.execute()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 93, in execute
    logger.warning("A job in the ThreadPool raised an exception: ", excep)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/logging/__init__.py", line 1531, in warning
    self._log(WARNING, msg, args, **kwargs)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/logging/__init__.py", line 1664, in _log
    self.handle(record)
    ~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/logging/__init__.py", line 1680, in handle
    self.callHandlers(record)
    ~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/logging/__init__.py", line 1735, in callHandlers
    if record.levelno >= hdlr.level:
                         ^^^^^^^^^^
AttributeError: '_io.TextIOWrapper' object has no attribute 'level'

Passing a directory on the CLI does appear to work: trimage -d /tmp/test

Warning: versions are different between png.h and png.c
  png.h version: 1.6.37
  png.c version: 1.6.44

 pngcrush 1.8.13, uses libpng 1.6.37 and zlib 1.2.11
 Check http://pmt.sf.net/
 for the most recent version.
** Processing: /tmp/test/test.png
1910x1362 pixels, 4x8 bits/pixel, RGB+alpha
Input IDAT size = 566932 bytes
Input file size = 571072 bytes

Trying:
  zc = 9  zm = 9  zs = 0  f = 0     IDAT size = 436327
  zc = 9  zm = 8  zs = 0  f = 0     IDAT size = 435470
  zc = 9  zm = 9  zs = 0  f = 2     IDAT size = 431901
  zc = 9  zm = 8  zs = 0  f = 2     IDAT size = 431485

Selecting parameters:
  zc = 9  zm = 8  zs = 0  f = 2     IDAT size = 431485

Output IDAT size = 431485 bytes (135447 bytes decrease)
Output file size = 435217 bytes (135855 bytes = 23.79% decrease)

Warning: versions are different between png.h and png.c
  png.h version: 1.6.37
  png.c version: 1.6.44

  Recompressing IDAT chunks in /tmp/test/test.png to /tmp/test/test.png.bak
   Total length of data found in critical chunks            =    403298
   Best pngcrush method        =   7 (ws 15 fm 0 zl 9 zs 0) =    436384
CPU time decode 0.109618, encode 1.370095, other 0.006705, total 1.504558 sec
File: /tmp/test/test.png, Old Size: 557.7KB, New Size: 426.2KB, Ratio: 23.6%
Exception ignored in: <function Worker.__del__ at 0x7fe590dd76a0>
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/trimage/trimage.py", line 414, in __del__
  File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 172, in shutdown
TypeError: 'NoneType' object is not callable

The test image gets compressed, but then a NoneType error is returned. These errors are likely bugs in upstream rather than packaging issues.

MangaD commented on 2021-12-27 15:52 (UTC)

@meetmarvin Removing all the files, except for PKGBUILD, and running makepkg -sic again, solved the issue: ModuleNotFoundError: No module named 'trimage'

zoe commented on 2020-02-17 14:10 (UTC)

Please remove python-sip-pyqt5 as dependancy.

Stunkymonkey commented on 2020-01-15 01:09 (UTC)

@fbrennan due to the changes in v5.11, where sip is moved into qt5 the dependency can be ignored: https://www.riverbankcomputing.com/static/Docs/PyQt5/incompatibilities.html#pyqt-v5-11

meetmarvin commented on 2020-01-13 22:11 (UTC) (edited on 2020-01-13 22:12 (UTC) by meetmarvin)

Any hint how to fix this? Thanks!

~ » trimage                                                                                                                                                                                                                 marvin@marvint-dl
Traceback (most recent call last):
  File "/usr/bin/trimage", line 19, in <module>
    import trimage
ModuleNotFoundError: No module named 'trimage'

hotaru commented on 2019-12-21 23:24 (UTC)

dependency python-sip-pyqt5 is gone: https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/sip&id=c54e6b92bda43fbea070c1b00c0695ec495c29c4

haawda commented on 2018-09-11 21:39 (UTC)

Hendrikto, this is a problem of the phonon-qt4 package. Read the AUR comments there.

Hendrikto commented on 2018-08-31 16:27 (UTC)

This does not build:

$ aurman -S trimage --deep_search
~~ initializing aurman...
~~ calculating solutions...

!! While searching for solutions the following errors occurred:
:: Not provided: python2-pyqt but needed by trimage-1.0.5-1

!! we could not find a solution

I tried installing the dependency manually, but it still did not work:

$ aurman -S --asdeps python2-pyqt4
~~ initializing aurman...
~~ calculating solutions...

!! While searching for solutions the following errors occurred:
:: Not provided: phonon-qt4-backend but needed by phonon-qt4-4.10.1-2

!! we could not find a solution
!! if you think that there should be one, rerun aurman with the --deep_search flag