-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not a supported image file and/or not writeable [but then works anyway?] #36
Comments
This is all wrong, ignore this comment.
|
Ok, thats pretty weird. i just noticed that the version of trimage i am using on ubuntu is different than this git. I installed it with:
The version number in the file is the same: 1.0.5. But this section of code is totally different because it is missing an indent:
In this git, that second if is indented within the if image.valid check. |
Ok, well indenting that section fixed it for me. I was wrong about the QImage thing. Leaving this here for others who might have the same issue with trimage on ubuntu. When i installed it with the package manager it actually ads two trimage.py files (i don't really know why). The issue is only in one of the files. /usr/lib/pymodules/python2.7/trimage/trimage.py <-- has bad indent. I don't know why there are two files, and i don't know why one of them is incorrect and that is the one being used by the system. this is all beyond me. But fixing that indent fixed my problem. -Adrian |
this patch by Daniel Clemente and fixes an indentation error for non-systemtray environments.
I'm seeing this issue for a couple of images as well - it appears as though trimage proceeds to optimize despite the error. They also appear to be all PNG images. Any ideas? |
root@localhost:/var/uploads/c# xvfb-run trimage -f 1434169021882_SU1HXzIwMTUwMTE2XzE0MTgxNS5qcGc.jpg
pngcrush 1.7.65, uses libpng 1.2.49 and zlib 1.2.8
Check http://pmt.sf.net/
for the most recent version.
[error] /var/uploads/c/1434169021882_SU1HXzIwMTUwMTE2XzE0MTgxNS5qcGc.jpg not a supported image file and/or not writeable
File: /var/uploads/c/1434169021882_SU1HXzIwMTUwMTE2XzE0MTgxNS5qcGc.jpg, Old Size: 881 KB, New Size: 679 KB, Ratio: 22.9%
(command run as root to confirm this isn't a permissions error)
Any way to figure out why it gives me an error but then works anyway? i would like to prevent the false negatives so that i can know when it really does fail. Is this related to the fact that i don't have an X server and i'm running trimage via xvfb ?
The text was updated successfully, but these errors were encountered: