1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Jehan
c51fc6e268 plug-ins: test for image types in a more robust way.
Rather than just assuming all non-gray images are RGB, do a bit more
robust check and reject unknown formats. Indeed even though I see we
took care of YUV, e-YCC and CMYK images above (and normally either
converted them to RGB or already exited with an error), I can see that
the OpenJPEG library could still return OPJ_CLRSPC_UNKNOWN or
OPJ_CLRSPC_UNSPECIFIED. Let's be thorough and not assume we got a SRGB
here.
Also add the alpha-variant tests inside their parent image type
respective test. This should not change anything by any logics, but
let's not leave anything for chance to strike us.
2018-03-04 16:25:39 +01:00
Jehan
71d9550f50 plug-ins: fix minor syntax bugs.
- Add a space before "if|for" and parenthese.
- Remove some spaces after parentheses.
- Get rid of 2 trailing whitespaces.
- Align function call parameters, declarations, assignments…
2018-03-04 16:20:29 +01:00
Darshan kadu
ae2ff84802 Made pluing support the RGB and grayscale with alpha 2018-03-04 15:28:12 +01:00
Mukund Sivaraman
32f60acead file-jp2-load: Switch from Jasper to OpenJPEG library 2018-02-23 20:23:16 +01:00
4 changed files with 806 additions and 230 deletions

View File

@@ -73,6 +73,7 @@ m4_define([lcms_required_version], [2.8])
m4_define([libpng_required_version], [1.6.25])
m4_define([liblzma_required_version], [5.0.0])
m4_define([openexr_required_version], [1.6.1])
m4_define([openjpeg_required_version], [2.1.0])
m4_define([gtk_mac_integration_required_version], [2.0.0])
m4_define([intltool_required_version], [0.40.1])
m4_define([perl_required_version], [5.10.0])
@@ -1798,30 +1799,27 @@ AC_SUBST(WMF_LIBS)
AC_SUBST(WMF_CFLAGS)
#####################
# Check for libjasper
#####################
####################
# Check for OpenJPEG
####################
AC_ARG_WITH(libjasper, [ --without-libjasper build without JPEG-2000 support])
AC_ARG_WITH(jpeg2000, [ --without-jpeg2000 build without JPEG 2000 support])
have_jp2=no
if test "x$with_libjasper" != xno && test -z "$JASPER_LIBS"; then
have_jp2=yes
AC_CHECK_LIB(jasper, jas_init,
FILE_JP2_LOAD='file-jp2-load$(EXEEXT)' ; JP2_LIBS=-ljasper,
[have_jp2="no (JasPer library not found)"
AC_MSG_WARN(*** JP2 plug-in will not be built (JasPer library not found) ***)])
else
have_jp2="no (JasPer support disabled)"
have_openjpeg=no
if test "x$with_jpeg2000" != xno; then
have_openjpeg=yes
PKG_CHECK_MODULES(OPENJPEG, libopenjp2 >= openjpeg_required_version,
FILE_JP2_LOAD='file-jp2-load$(EXEEXT)'
have_openjpeg=yes,
have_openjpeg="no (OpenJPEG not found)")
fi
if test "x$have_jp2" = xyes; then
MIME_TYPES="$MIME_TYPES;image/jp2;image/jpeg2000;image/jpx"
if test "x$have_openjpeg" = xyes; then
MIME_TYPES="$MIME_TYPES;image/jp2"
fi
AM_CONDITIONAL(BUILD_JP2, test "x$have_jp2" = xyes)
AM_CONDITIONAL(HAVE_OPENJPEG, test "x$have_openjpeg" = xyes)
AC_SUBST(FILE_JP2_LOAD)
AC_SUBST(JP2_LIBS)
################
@@ -2747,7 +2745,7 @@ Optional Plug-Ins:
Ascii Art: $have_libaa
Ghostscript: $have_gs
Help Browser: $have_webkit
JPEG 2000: $have_jp2
JPEG 2000: $have_openjpeg
MNG: $have_libmng
OpenEXR: $have_openexr
WebP: $have_webp

View File

@@ -840,6 +840,8 @@ file_html_table_LDADD = \
$(INTLLIBS) \
$(file_html_table_RC)
file_jp2_load_CFLAGS = $(OPENJPEG_CFLAGS)
file_jp2_load_SOURCES = \
file-jp2-load.c
@@ -854,7 +856,7 @@ file_jp2_load_LDADD = \
$(libgimpbase) \
$(GTK_LIBS) \
$(GEGL_LIBS) \
$(JP2_LIBS) \
$(OPENJPEG_LIBS) \
$(RT_LIBS) \
$(INTLLIBS) \
$(file_jp2_load_RC)

File diff suppressed because it is too large Load Diff

View File

@@ -38,7 +38,7 @@
'file-glob' => {},
'file-header' => { ui => 1, gegl => 1 },
'file-html-table' => { ui => 1, gegl => 1 },
'file-jp2-load' => { ui => 1, optional => 1, gegl => 1, libs => 'JP2_LIBS' },
'file-jp2-load' => { ui => 1, optional => 1, gegl => 1, libs => 'OPENJPEG_LIBS', cflags => 'OPENJPEG_CFLAGS' },
'file-mng' => { ui => 1, gegl => 1, optional => 1, libs => 'MNG_LIBS', cflags => 'MNG_CFLAGS' },
'file-pat' => { ui => 1, gegl => 1 },
'file-pcx' => { ui => 1, gegl => 1 },