theres a function for exporting a jpeg in helper\pixbuf-ops.cpp, has been since 2008.
function is bool sp_export_jpg_file( SPDocument *doc, gchar const *filename, double x0, double y0, double x1, double y1, unsigned width, unsigned height, double xdpi, double ydpi, unsigned long bgcolor, double quality,GSList *items) no idea if it still works or has bitrotted to hell. Worked when I wrote it. :)
I did have it hooked into a right click menu option to export to jpg that was ifdeffed out, but I'm not sure if that ever got committed to trunk, cant locate it if it was, may have been nuked at some point if it was.
On Sat, Feb 18, 2017 at 7:43 PM, C R <cajhne@...400...> wrote:
Jabier turned me on to pngquant offlist. It certainly seems better at (lossy) optimisation of pngs than optipng. However it comes nowhere near to the compression capabilities of just a regular jpeg. I'm able to shrink a 1.8 MB png to 798kb, but a 70% quality jpeg shrinks to approx 141KB.
Keep in mind that for e-commerce website, your site is ranked by search engines by how fast it loads, and how much data it uses. 798KB might not seem like a lot, but when you have a product with 5 images to display, plus the site graphics, it's still unacceptably large.
Also, I'm hesitant to suggest lossy optimisation for pngs. The thing i like about pngs are that they are not lossy, which is definitely useful. I expect jpegs to be lossy. I also expect them to be tiny comparatively at the same resolution, so it's a good trade-off. I think probably the last thing users want to do is be fiddling with file format compression options on their pngs, but I've added pngquant to my graphics tools in case I need transparency + as small a file as possible. It's good to know there's a middle-ground that uses pngs.
Unfortunately, even with optimisation, pngs are still not useful for e-commerce web content.
-C
On Sat, Feb 18, 2017 at 5:12 PM, Maren Hachmann <maren@...3165...> wrote:
Just a tiny bit of input, if sometime there's a decision between optipng and pngquant: Some time (years) ago there was a test in freiesMagazin (which is offline now :-() where pngquant came out as the winner in terms of quality-size relationship.
q=cache:tJjnl9ViTaUJ:http://www.freiesmagazin.de/ftp/2013/ freiesMagazin-2013-04.pdf%2BfreiesMagazin+pngquant&hl=de&ct=clnk#19
Maren
Am 18.02.2017 um 17:17 schrieb C R:
Tried optipng, but unfortunately could get nowhere near the compression I'd need vs jpeg. We're talking greater than 10 times more compressed results with jpegs for nearly the same visual quality.
I'm afraid it just doesn't cut it, unfortunately. :/ -C
On Sat, Feb 18, 2017 at 2:44 PM, C R <cajhne@...400...> wrote:
More PNG optimisation features would be great. I'd love it if I could
use
them in place of jpegs at the same file sizes I need, if they are also
of
equivalent visual quality.
-C
On 18 Feb 2017 2:24 p.m., "Alexandre Prokoudine" <alexandre.prokoudine@...400...> wrote:
On Sat, Feb 18, 2017 at 5:18 PM, Shlomi Fish wrote:
> Built-in pngquant or pngcrush would be a great feature. >
I think http://optipng.sourceforge.net/ is better than pngcrush.
OptiPNG what I use too. I just don't have a particular opinion on the available options :)
Alex
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel