12-02-2014, 07:13 PM | #31 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
If you need source packages, try checking http://archlinux.org/packages which will provide the Upstream Urls instead of repackaging the sources.
Last edited by eschwartz; 12-02-2014 at 07:17 PM. |
12-02-2014, 09:38 PM | #32 | |
Sigil Developer
Posts: 8,109
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Hi eschwartz,
Quote:
Thanks, Kevin |
|
Advert | |
|
12-02-2014, 10:55 PM | #33 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Oh, that seems to be priceless.
I really love closed-source linux programs, too... I am sure it runs, it just won't be packaged by anybody. Is pngout actually being used? It probably isn't necessary, how many different png optimizers does one program need? But assuming we want to squeeze every possible byte out, a noteworthy goal, perhaps it is a better idea to use zopflipng which is part of google's open-source zopfli compression engine (alternative to deflate, it takes 2-3 times longer in order to find the smallest compression path). It even claims to be marginally better than pngout, by a whole 0.5% https://code.google.com/p/zopfli/sou...ADME.zopflipng |
12-03-2014, 02:09 AM | #34 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You can ignore PNGOUT. It is an old leftover I apparently forgot to delete. The reason I kicked it out, is that there is no Linux/OSX version and it is closed source (no way to rebuild if the need arises).
The program is checking what the OS is to determine how to call the image optimizing programs. If I recall correctly (will look it up later today), on Windows systems it will use the executables in the directory and for Linux (and also OSX) it should use the ones in the path. Based on your error report, it seems that it does not starts fine, it tries to open 'open'. I will get back to you. Last edited by Toxaris; 12-03-2014 at 02:11 AM. |
12-03-2014, 02:59 AM | #35 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
As it is now, I am detecting if it is running on Windows or other. If it is running on other, it will not give a pathname, but just execute the command. For jpegtran the command would be like:
jpegtran -optimize -progressive -copy none -outfile <filename> <filename> Could you check if that is working on OSX? |
Advert | |
|
12-03-2014, 09:29 AM | #36 |
Sigil Developer
Posts: 8,109
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Hi Toxaris,
Will check that and get back to you. One approch to making a cross-platform plugin that has binaries might be to create your own winbin\, osxbin/, linuxbin/ directories in the plugin folder and store the small required binaries in those and then invoke them with the correct full path depending on what sys you are running on. The platform can be easily detected by python and passed in if need be. That way, no one has to build those binaries on OSX as there are no simple packages for Mac users. I have tried setting the path env var to point to the binaries but I am not sure since you use subprocess to invoke it if those environment vars are properly picked up in the child process or not. KevinH |
12-03-2014, 09:35 AM | #37 | |
Resident Curmudgeon
Posts: 76,016
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
For RGB jpegtran.exe" -optimize -progressive -copy none -scans jpeg_scan_rgb.txt <filename> <filename> For grayscale jpegtran.exe" -optimize -progressive -copy none -scans jpeg_scan_bw.txt <filename> <filename> For PNG, there is an open source optimizer called OptiPNG that you could use. http://optipng.sourceforge.net/ There is also another free PNG optimizer called PNG Optimizer. http://sourceforge.net/projects/pngoptimizer/ Last edited by JSWolf; 12-03-2014 at 09:44 AM. |
|
12-03-2014, 10:10 AM | #38 | |
Sigil Developer
Posts: 8,109
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Hi,
I think your trying to write over the same file you read from is the issue on Mac OS X. Code:
kbhend$ ./jpegtran -optimize -progressive -copy none -outfile ../junk.jpg ../PluginRunner.jpg But if I try to overwrite the same file in-place ... Code:
kbhend$ ./jpegtran -optimize -progressive -copy none -outfile ../test.jpg ../test.jpg Empty input file So at least on Mac OS X you can't overwrite in place. Hope this helps, KevinH Quote:
|
|
12-03-2014, 10:29 AM | #39 | |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
|
|
12-03-2014, 11:46 AM | #40 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
12-03-2014, 11:49 AM | #41 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
12-03-2014, 12:20 PM | #42 | |
Sigil Developer
Posts: 8,109
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Hi Toxaris,
Quote:
Thanks, Kevin |
|
12-03-2014, 03:07 PM | #43 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Let's make it work first... I will sent you a message later with a test version...
|
12-03-2014, 07:43 PM | #44 |
Resident Curmudgeon
Posts: 76,016
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Toxaris, do you think you can implement the following so we get even better jpeg optimization?
For RGB jpegtran.exe" -optimize -progressive -copy none -scans jpeg_scan_rgb.txt <filename> <filename> For grayscale jpegtran.exe" -optimize -progressive -copy none -scans jpeg_scan_bw.txt <filename> <filename> |
12-04-2014, 08:54 AM | #45 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Comic optimizer script | rhon | Kobo Reader | 0 | 11-08-2012 06:04 PM |
Mokle - Mangas Optimizer for Kindle | devorez | Kindle Developer's Corner | 11 | 08-14-2012 07:15 PM |
Patent/Heavy graphics pdfs and Adobe PDF Optimizer | andrewscheinman | iRex | 4 | 12-26-2009 11:39 AM |
epub, ePub, EPUB, warum blos ePub? | flowoeB | Lounge | 5 | 11-27-2009 09:37 AM |
PRS-500 PDF file optimizer | phigdon | Sony Reader Dev Corner | 1 | 04-01-2007 11:40 PM |