Kilian / Trimage

A cross-platform tool for optimizing PNG and JPG files.
http://trimage.org
MIT License
706 stars 55 forks source link

Remove QT dependency when run from command line #19

Open incidentist opened 12 years ago

incidentist commented 12 years ago

I want to run Trimage as a command-line tool on a server, but it complains about a lack of QT when I try. It would be great if Trimage didn't use the QT library unless it is needed.

Kilian commented 12 years ago

Removing the QT library is a pretty big thing since the threading is managed with QThread, and the command-line tool is just a nice quick add-on to the main GUI. I don't see this happening soon.

eagleas commented 12 years ago

Hi, guys! https://github.com/Kilian/Trimage/blob/master/src/trimage/trimage.py#L433 These two lines code (!!!) is all logic Trimage.

AlisterH commented 11 years ago

Removing the QT library is a pretty big thing since the threading is managed with QThread, and the command-line tool is just a nice quick add-on to the main GUI. I don't see this happening soon.

Even if QT is present, if $DISPLAY is not set then you get an error message "cannot connect to X server". Is it using some sort of hidden window or something when it runs in command line mode, or could this be fixed?

slrslr commented 10 years ago

on CentOS 6.5 it wants to install 40Mb of data, when i run "yum install PyQt4" and im unsure if that is all that needs to be installed..

mikemcguire commented 8 years ago

There should be a disclaimer on the site where anywhere it says CLI it's got fine print "Depends on GUI". Save so much time

FrostBird347 commented 9 months ago

I was able to get this to run on google colab by adding the command line option -platform vnc. I can't guarantee that this will work on other headless environments, but for anybody else who's wanting to get this to work in a headless environment it's worth trying this.