In gimp_color_profile_new_from_icc_profile() and
gimp_image_validate_icc_profile(), don't raise a critical when
encountering an empty profile, but rather reject it gracefully with
an error.
... instead of calling g_type_register_static() ourselves.
Keep the old foo_interface_get_type() (replaced with
foo_get_type()) around as deprecated functions, to maintain ABI
compatibility. They will be removed in a separate commit in
master, so that this commit can be easily cherry-picked to
gimp-2-10.
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
Added in commit 415f869f20 to drop a
workaround from commit bac042db39.
This line was not a part of the workaround and looks completely
unrelated. I assume that's just a commit mistake. :-)
and use babl to convert between profiles if possible. With the default
BABL_TOLERANCE this is about 5 times faster than lcms on my test image.
Using babl can be disabled by setting GIMP_COLOR_TRANSFORM_DISABLE_BABL.
which takes a GimpColorProfile and a Babl format, and returns a new
format which uses the profile's RGB primaries and TRC, and the
original format's pixel layout; or NULL if babl couldn't create a
space from the profile's ICC data.
Use cmsFLAGS_NOOPTIMIZE only for actual image buffer or single color
transforms, but not for previews or the image display. Makes things a
lot more responsive again.
It doesn't really "fail", we check if an error was logged during
transform creation and get rid of the transform even if lcms returned
a pointer. This totally sucks but is better than crashing on a corrupt
transform.
Which takes two profiles and returns TRUE if converting between
them works correctly without a GimpColorTransform. Use it in
gimp_color_transform_new() to return a NULL transform if none
is needed. Took the code from gimp-gegl-loops.c.
which encapsulates a cmsHTRANSFORM and does all the pixel format
conversion magic. It has API to create transforms and proofing
transforms, and to convert pixels arrays and GeglBuffers.
Before, each place which has a transform had to keep around the
transform and its input and output Babl formats, and had to implement
lots of stuff itself. Now all that lives in GimpColorTransform,
removing lots of logic from many places, and pretty much removing lcms
from the public API entirely.
This removes including <lcms2.h>, LCMS_LIBS and LCMS_CFLAGS from
almost all directories and potentially allows to replace lcms by
something else.
Trick lcms into converting cairo-RGB24 pixels directly, by using
TYPE_BGRA_8 on little endian and TYPE_ARGB_8 on big endian. They have
the same byte order, and the alpha channel (ignored by lcms anyway)
takes the place of the unused byte of cairo-RGB24.
This saves two babl conversions around cmsDoTransform().
Return "R'G'B'[A] u8" and "TYPE_RGB[A]_8" and babl and lcms formats.
I'm not sure which code triggered the warning about an unhandled
format, but now it handles indexed images too.
Rename profile constructors to say "d65_gray" instead of just "gray",
"srgb_trc" instead of "srgb_gamma", and drop the "srgb" from
"srgb_linear" because we now say "d65". This should be a naming scheme
that doesn't conflict with whatever future functions we might add.
Support creating linear/sRGB-gamma variants of gray profiles and
rename gimp_color_profile_new_linear_rgb_from_color_profile() to
gimp_color_profile_new_linear_gamma_from_color_profile() because it's
not RGB-specific any longer.
Add gimp_color_profile_new_srgb_gray() and
gimp_color_profile_new_linear_gray().
I know "srgb_gray" sounds odd but it's better than
"gray_with_srgb_trc"...
Please review, I have no clue if that code is right.
Add two private functions which are currently unused but will
become public once it's clear where exactly we need them:
gimp_color_profile_get_rgb_matrix_colorants(): returns a GimpMatrix2
with the RGB colorants.
gimp_color_profile_new_foobar(): takes an existing profile and creates
a new one with the same RGB colorants but a linear gamma TRC. To be
renamed and made more general.
Fix gimp_color_profile_get_format() to return the right format for
"cairo-RGB24": simply check for the more special cairo formats first,
then check for the general RGB models. Found by Massimo.
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
it used to be a typedef to gpointer and actually was a cmsHPROFILE.
Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).
Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
which returns a GimpColorProfile instead of just an ICC blob like
get_icc_profile(). Also, it will always return a profile, as in
fall back to the built-in profiles automatically.
Which returns an lcms format given a Babl format. It also returns a
Babl format to be used instead of the passed format, but only if lcms
doesn't support the passed format.
Profiles from disk have a lower precision than those created from
scratch via lcms API. Ensure identical profiles by returning a
"loaded" profile from gimp_lcms_create_srgb_profile() (simply do a
save/load roundtrip in memory).
which returns a string meant to label the profile in the GUI, it's
either the profile's description, its model, or "(unnamed profile)" as
a fallback. Use the function instead of duplicating that logic
inconsistently and imcompletely all over the place.
The foo_DEPENDENCIES rule replaces the default dependencies, where
EXTRA_foo_DEPENDENCIES just appends to it. This was causing libgimp
and libgimpui to build out of order.
Add functions to get a profile's description, manufacturer, model and
copyright, and use them instead of implementing the same 10 times.
Also add a GimpColorProfile typedef which avoids both having to
include lcms globally or using a gpointer instead (which looks bad and
non-descriptive in an API).
Change gimp_pixbuf_create_buffer() to copy the pixels if a linear
buffer cannot be created. Add functions that convert between
GimpTempBuf and GdkPixbuf. Fix users of gimp_pixbuf_create_buffer()
to make the least possible copies. Patch modified by Mitch.
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
finally acknowledging the fact that app/ depends on gdk-pixbuf almost
globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.
The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2009-01-23 Kevin Cozens <kcozens@cvs.gimp.org>
* libgimpcolor/gimprgb-parse.c: Applied patch from Andreas Turtschan
to fix more RGB colour values. Fixes bug #568909.
svn path=/trunk/; revision=27937
2009-01-23 Kevin Cozens <kcozens@cvs.gimp.org>
* libgimpcolor/gimprgb-parse.c: Applied patch from Andreas Turtschan
to fix colour values for slategray and slategray. Fixes bug #568839.
svn path=/trunk/; revision=27932
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-12-10 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimprgb-parse.c: updated link to the color
keywords
in the SVG spec.
svn path=/trunk/; revision=27772
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Implemented the layer
modes Hue, Saturation, Color and Value.
Works the same for 100% opaque layers:
o Hue
o Saturation
o Color
o Value
* libgimpcolor/gimphsl.[ch]: Added gimp_hsl_set().
svn path=/trunk/; revision=27466
2007-10-29 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimpadaptivesupersample.c
(gimp_adaptive_supersample_area): return with a warning if
called
with NULL render_func or put_pixel_func.
svn path=/trunk/; revision=23985
2007-09-28 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimpcolorspace.c (gimp_hsv_to_rgb_int): avoid the
ambiguity of returning different values for the same color and
limit the Hue output range to [0..359].
svn path=/trunk/; revision=23681
2007-06-25 Sven Neumann <sven@gimp.org>
* configure.in: removed extra check for gthread and fold it into
the GLIB and GTK checks.
* */Makefile.am: changed accordingly.
* app/main.c (main): always call g_thread_init().
svn path=/trunk/; revision=22832