Compare commits
No commits in common. "68e786b4e89ed27dc253d6b188759aee62246811" and "5abf6a719f6e1326d3259d92aff1849e00433eae" have entirely different histories.
68e786b4e8
...
5abf6a719f
21
fiv-io.c
21
fiv-io.c
@ -27,22 +27,20 @@
|
|||||||
#include <webp/encode.h>
|
#include <webp/encode.h>
|
||||||
#include <webp/mux.h>
|
#include <webp/mux.h>
|
||||||
|
|
||||||
#ifdef HAVE_JPEG_QS
|
// Colour management must be handled before RGB conversions.
|
||||||
#include <setjmp.h>
|
#ifdef HAVE_LCMS2
|
||||||
#include <stdio.h>
|
#include <lcms2.h>
|
||||||
|
#endif // HAVE_LCMS2
|
||||||
|
|
||||||
|
#ifdef HAVE_JPEG_QS
|
||||||
#include <jpeglib.h>
|
#include <jpeglib.h>
|
||||||
|
#include <setjmp.h>
|
||||||
// This library is tricky to build, simply make it work at all.
|
// This library is tricky to build, simply make it work at all.
|
||||||
#define NO_SIMD
|
#define NO_SIMD
|
||||||
#include <jpeg-quantsmooth/quantsmooth.h>
|
#include <jpeg-quantsmooth/quantsmooth.h>
|
||||||
#undef NO_SIMD
|
#undef NO_SIMD
|
||||||
#endif // HAVE_JPEG_QS
|
#endif // HAVE_JPEG_QS
|
||||||
|
|
||||||
// Colour management must be handled before RGB conversions.
|
|
||||||
#ifdef HAVE_LCMS2
|
|
||||||
#include <lcms2.h>
|
|
||||||
#endif // HAVE_LCMS2
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBRAW
|
#ifdef HAVE_LIBRAW
|
||||||
#include <libraw.h>
|
#include <libraw.h>
|
||||||
#endif // HAVE_LIBRAW
|
#endif // HAVE_LIBRAW
|
||||||
@ -267,7 +265,6 @@ static void
|
|||||||
trivial_cmyk_to_host_byte_order_argb(unsigned char *p, int len)
|
trivial_cmyk_to_host_byte_order_argb(unsigned char *p, int len)
|
||||||
{
|
{
|
||||||
// This CMYK handling has been seen in gdk-pixbuf/JPEG, GIMP/JPEG, skcms.
|
// This CMYK handling has been seen in gdk-pixbuf/JPEG, GIMP/JPEG, skcms.
|
||||||
// It will typically produce horribly oversaturated results.
|
|
||||||
// Assume that all YCCK/CMYK JPEG files use inverted CMYK, as Photoshop
|
// Assume that all YCCK/CMYK JPEG files use inverted CMYK, as Photoshop
|
||||||
// does, see https://bugzilla.gnome.org/show_bug.cgi?id=618096
|
// does, see https://bugzilla.gnome.org/show_bug.cgi?id=618096
|
||||||
while (len--) {
|
while (len--) {
|
||||||
@ -1058,10 +1055,6 @@ static cairo_surface_t *
|
|||||||
open_libjpeg_turbo(
|
open_libjpeg_turbo(
|
||||||
const gchar *data, gsize len, FivIoProfile profile, GError **error)
|
const gchar *data, gsize len, FivIoProfile profile, GError **error)
|
||||||
{
|
{
|
||||||
// Note that there doesn't seem to be much of a point in using this
|
|
||||||
// simplified API anymore, because JPEG-QS needs the original libjpeg API.
|
|
||||||
// It's just more or less duplicated code which won't compile with
|
|
||||||
// the slow version of the library.
|
|
||||||
tjhandle dec = tjInitDecompress();
|
tjhandle dec = tjInitDecompress();
|
||||||
if (!dec) {
|
if (!dec) {
|
||||||
set_error(error, tjGetErrorStr2(dec));
|
set_error(error, tjGetErrorStr2(dec));
|
||||||
@ -2332,7 +2325,7 @@ fiv_io_open(
|
|||||||
|
|
||||||
cairo_surface_t *surface =
|
cairo_surface_t *surface =
|
||||||
fiv_io_open_from_data(data, len, uri, profile, enhance, error);
|
fiv_io_open_from_data(data, len, uri, profile, enhance, error);
|
||||||
g_free(data);
|
free(data);
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user