1. 07 Oct, 2018 1 commit
    • Michael Natterer's avatar
      app: remove the image's "Enable Color Management" toggle · c399b894
      Michael Natterer authored
      It was not doing anything right since space invasion. We now treat the
      built-in sRGB profile like any other profile and never bypass
      conversions based on some weird toggle.
      
      Instead, introduce a "Use sRGB Profile" toggle which, when enabled,
      hides whatever profile away so the image actually uses the built-in
      sRGB profile.
      
      This is different from discarding and then re-assigning the same
      profile only by being faster and more convenient.
      c399b894
  2. 18 Sep, 2018 1 commit
    • Ell's avatar
      app, libgimp*, modules: don't use g_type_class_add_private() ... · 3b0040c0
      Ell authored
      ... and G_TYPE_INSTANCE_GET_PRIVATE()
      
      g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
      deprecated in GLib 2.58.  Instead, use
      G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
      G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
      foo_get_instance_private() functions, all of which are available in
      the GLib versions we depend on.
      
      This commit only covers types registered using one of the
      G_DEFINE_FOO() macros (i.e., most types), but not types with a
      custom registration function, of which we still have a few -- GLib
      currently only provides a (non-deprecated) public API for adding a
      private struct using the G_DEFINE_FOO() macros.
      
      Note that this commit was 99% auto-generated (because I'm not
      *that* crazy :), so if there are any style mismatches... we'll have
      to live with them for now.
      3b0040c0
  3. 21 Jul, 2018 1 commit
    • Michael Natterer's avatar
      Initial space invasion commit in GIMP · e09e563a
      Michael Natterer authored
      All babl formats now have a space equivalent to a color profile,
      determining the format's primaries and TRCs. This commit makes GIMP
      aware of this.
      
      libgimp:
      
      - enum GimpPrecision: rename GAMMA values to NON_LINEAR and keep GAMMA
        as deprecated aliases, add PERCEPTUAL values so we now have LINEAR,
        NON_LINEAR and PERCPTUAL for each encoding, matching the babl
        encoding variants RGB, R'G'B' and R~G~B~.
      
      - gimp_color_transform_can_gegl_copy() now returns TRUE if both
        profiles can return a babl space, increasing the amount of fast babl
        color conversions significantly.
      
      - TODO: no solution yet for getting libgimp drawable proxy buffers in
        the right format with space.
      
      plug-ins:
      
      - follow the GimpPrecision change.
      
      - TODO: everything else unchanged and partly broken or sub-optimal,
        like setting a new image's color profile too late.
      
      app:
      
      - add enum GimpTRCType { LINEAR, NON_LINEAR, PERCEPTUAL } as
        replacement for all "linear" booleans.
      
      - change gimp-babl functions to take babl spaces and GimpTRCType
        parameters and support all sorts of new perceptual ~ formats.
      
      - a lot of places changed in the early days of goat invasion didn't
        take advantage of gimp-babl utility functions and constructed
        formats manually. They all needed revisiting and many now use much
        simpler code calling gimp-babl API.
      
      - change gimp_babl_format_get_color_profile() to really extract a
        newly allocated color profile from the format, and add
        gimp_babl_get_builtin_color_profile() which does the same as
        gimp_babl_format_get_color_profile() did before. Visited all callers
        to decide whether they are looking for the format's actual profile,
        or for one of the builtin profiles, simplifying code that only needs
        builtin profiles.
      
      - drawables have a new get_space_api(), get_linear() is now get_trc().
      
      - images now have a "layer space" and an API to get it,
        gimp_image_get_layer_format() returns formats in that space.
      
      - an image's layer space is created from the image's color profile,
        change gimpimage-color-profile to deal with that correctly
      
      - change many babl_format() calls to babl_format_with_space() and take
        the space from passed formats or drawables
      
      - add function gimp_layer_fix_format_space() which replaces the
        layer's buffer with one that has the image's layer format, but
        doesn't change pixel values
      
      - use gimp_layer_fix_format_space() to make sure layers loaded from
        XCF and created by plug-ins have the right space when added to the
        image, because it's impossible to always assign the right space upon
        layer creation
      
      - "assign color profile" and "discard color profile" now require use
        of gimp_layer_fix_format_space() too because the profile is now
        embedded in all formats via the space.  Add
        gimp_image_assign_color_profile() which does all that and call it
        instead of a simple gimp_image_set_color_profile(), also from the
        PDB set-color-profile functions, which are essentially "assign" and
        "discard" calls.
      
      - generally, make sure a new image's color profile is set before
        adding layers to it, gimp_image_set_color_profile() is more than
        before considered know-what-you-are-doing API.
      
      - take special precaution in all places that call
        gimp_drawable_convert_type(), we now must pass a new_profile from
        all callers that convert layers within the same image (such as
        image_convert_type, image_convert_precision), because the layer's
        new space can't be determined from the image's layer format during
        the call.
      
      - change all "linear" properties to "trc", in all config objects like
        for levels and curves, in the histogram, in the widgets. This results
        in some GUI that now has three choices instead of two.
        TODO: we might want to reduce that back to two later.
      
      - keep "linear" boolean properties around as compat if needed for file
        pasring, but always convert the parsed parsed boolean to
        GimpTRCType.
      
      - TODO: the image's "enable color management" switch is currently
        broken, will fix that in another commit.
      e09e563a
  4. 11 Jul, 2018 1 commit
  5. 15 Jul, 2017 1 commit
  6. 24 Nov, 2016 1 commit
    • Jehan's avatar
      Bug 774906 - Replace File>New default ppi of 72... · 39190807
      Jehan authored
      ... with something more suitable.
      72 PPI is from a time where people thought this was a common screen
      resolution. This is not the case nowadays, and anyway images targetted
      for screen display should not bother with PPI resolution at all, only
      with actual pixel dimensions.
      PPI resolution is more useful for printing. And for this case, 300 is
      quite an accepted OK value for most cases. So this is likely a better
      default for GIMP.
      39190807
  7. 16 Nov, 2016 1 commit
  8. 09 Nov, 2016 1 commit
  9. 12 Oct, 2016 1 commit
  10. 16 May, 2016 1 commit
  11. 08 May, 2016 1 commit
    • Michael Natterer's avatar
      app: add basic support for creating images with color profiles · 54c0b047
      Michael Natterer authored
      Add "gboolean color_managed" and "GFile *color_profile" to
      GimpTemplate. Add a toggle and profile combo to GimpTemplateEditor.
      Honor the new template properties in gimp_image_new_from_template().
      
      Using a GFile property instead of a GIMP_TYPE_CONFIG_PATH is
      preliminary, see the previous commit. I'd like to use GFile more
      directly when dealing with config files, this is for testing that.
      54c0b047
  12. 11 Feb, 2016 1 commit
  13. 15 Jun, 2014 1 commit
  14. 14 Jun, 2014 1 commit
  15. 02 Jun, 2014 1 commit
  16. 14 May, 2014 1 commit
  17. 13 May, 2014 1 commit
  18. 06 May, 2014 1 commit
  19. 14 Oct, 2013 1 commit
    • Michael Natterer's avatar
      app,libgimp*: fix includes to follow our include policy · 697572cc
      Michael Natterer authored
      - 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
      697572cc
  20. 23 Jun, 2013 1 commit
    • Michael Natterer's avatar
      Add support for both gamma-corrected and linear for all bit depths · caf73f5f
      Michael Natterer authored
      - Add new enum GimpComponentType which contains u8, u16, u32 etc.
      - Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
      - Add all the needed formats to gimp-babl.c
      - Bump the XCF version to 5 and make sure version 4 with the old
        GimpPrecision enum values is loaded correctly
      
      This change blows up the precision enums in "New Image" and
      Image->Precision so we can test all this stuff. It is undecided what
      format will be user-visible options in 2.10.
      caf73f5f
  21. 24 Aug, 2012 1 commit
  22. 07 May, 2012 1 commit
  23. 02 May, 2012 3 commits
  24. 02 Mar, 2011 1 commit
  25. 07 Feb, 2011 1 commit
  26. 05 Jun, 2010 1 commit
  27. 09 Feb, 2010 1 commit
  28. 03 Aug, 2009 1 commit
    • Michael Natterer's avatar
      Bring parent items to the public API in the core · c4075975
      Michael Natterer authored
      * app/core/gimpimage.[ch]: make the parent parameter public in
      add_layer(), add_layers(), add_channel() and add_vectors().
      
      * app/vectors/gimpvectors-import.[ch]: add parent parameters to
        the vectors import functions.
      
      * app/core/gimpchannelundo.[ch]
      * app/core/gimplayerundo.[ch]
      * app/vectors/gimpvectorsundo.[ch]
      * app/core/gimpimage-undo-push.[ch]: remember the parent item when
        removing layers, channels and vectors.
      
      * app/actions/channels-commands.c
      * app/actions/debug-commands.c
      * app/actions/edit-commands.c
      * app/actions/layers-commands.c
      * app/actions/vectors-commands.c
      * app/core/gimp-edit.c
      * app/core/gimpimage-duplicate.c
      * app/core/gimpimage-merge.c
      * app/core/gimpimage-quick-mask.c
      * app/core/gimplayer-floating-sel.c
      * app/core/gimpselection.c
      * app/core/gimptemplate.c
      * app/dialogs/file-open-dialog.c
      * app/display/gimpdisplayshell-dnd.c
      * app/text/gimptext-compat.c
      * app/tools/gimptexttool.c
      * app/tools/gimpvectortool.c
      * app/widgets/gimptoolbox-dnd.c
      * app/xcf/xcf-load.c
      * tools/pdbgen/pdb/image.pdb
      * tools/pdbgen/pdb/paths.pdb
      * tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
        functions and add FIXMEs all over the place because there is some
        more hacking needed to make adding with index = -1 (on top of the
        current item) work again.
      
      * app/pdb/image-cmds.c
      * app/pdb/paths-cmds.c
      * app/pdb/vectors-cmds.c: regenerated.
      
      * app/core/gimpimage-duplicate.c: duplicate the original image's
        tree structure in the copy.
      
      * app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
        add utility function gimp_item_tree_view_get_drop_index() which
        figures where to add something dropped to an item tree.
      
      * app/widgets/gimpchanneltreeview.c
      * app/widgets/gimplayertreeview.c
      * app/widgets/gimpvectorstreeview.c: changed accordingly, using above
        new GimpItemTreeView API.
      c4075975
  29. 17 Jan, 2009 1 commit
    • Michael Natterer's avatar
      Change licence to GPLv3 (and to LGPLv3 for libgimp). · d9b5207a
      Michael Natterer authored
      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
      d9b5207a
  30. 09 Oct, 2008 2 commits
    • Michael Natterer's avatar
      Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a · 5503e6a0
      Michael Natterer authored
      2008-10-09  Michael Natterer  <mitch@gimp.org>
      
      	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
      	had a GEGL dependency (they will have in the next commit, but I
      	wanted to keep the commit separate).
      
      	* app/dialogs/Makefile.am
      	* app/file/Makefile.am
      	* app/gui/Makefile.am
      	* app/menus/Makefile.am
      	* app/paint/Makefile.am
      	* app/plug-in/Makefile.am
      	* app/text/Makefile.am
      	* app/vectors/Makefile.am
      	* app/widgets/Makefile.am
      	* app/xcf/Makefile.am: add GEGL_CFLAGS.
      
      	* app/actions/*.c
      	* app/core/*.c
      	* app/dialogs/*.c
      	* app/display/*.c
      	* app/file/*.c
      	* app/gui/*.c
      	* app/menus/*.c
      	* app/paint/*.c
      	* app/pdb/gimppdb-utils.c
      	* app/pdb/gimpprocedure.c
      	* app/plug-in/*.c
      	* app/text/*.c
      	* app/tools/*.c
      	* app/vectors/*.c
      	* app/widgets/*.c
      	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
      	to all files which include a drawable subclass or gimpimage.h
      
      	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
      	in all generated files.
      
      	* app/pdb/*-cmds.c: regenerated.
      
      	* data/images/gimp-splash.png: the goat is still sleeping.
      	By Aurore Derriennic.
      
      
      svn path=/trunk/; revision=27202
      5503e6a0
    • Michael Natterer's avatar
      Remove the last code duplication from the undo system (or if not the last · 0e4a35a2
      Michael Natterer authored
      2008-10-09  Michael Natterer  <mitch@gimp.org>
      
      	Remove the last code duplication from the undo system (or if not
      	the last then at least the most ugly):
      
      	* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
      	add "gboolean push_undo" parameter and add the item without
      	touching undo if it's TRUE. Changed assertions from
      	g_object_is_floating() to !gimp_item_is_attached() so they also
      	take items from the undo stack and not only newly created ones.
      
      	(gimp_image_remove_layer,channel,vectors): add "push_undo"
      	parameter here too. Also add a "new_active" parameter where an
      	optional new active item can be passed.
      
      	(gimp_image_remove_layer,channel): these functions must not be
      	called with push_undo=FALSE and a floating selection attached to
      	the layer/channel. This can't currently happen; added warnings in
      	case other code is changed and makes it happen anyway.
      
      	* app/core/gimpchannelundo.c
      	* app/core/gimplayerundo.c
      	* app/vectors/gimpvectorsundo.c: use above functions to add/remove
      	items instead of duplicating (parts of) their code. Pass
      	push_undo=FALSE and the previously active item to the remove()
      	functions.
      
      	* app/actions/channels-commands.c
      	* app/actions/edit-commands.c
      	* app/actions/layers-commands.c
      	* app/actions/vectors-commands.c
      	* app/core/gimp-edit.c
      	* app/core/gimpchannelundo.c
      	* app/core/gimpimage-crop.c
      	* app/core/gimpimage-duplicate.c
      	* app/core/gimpimage-merge.c
      	* app/core/gimpimage-quick-mask.c
      	* app/core/gimpimage-scale.c
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimplayerundo.c
      	* app/core/gimpselection.c
      	* app/core/gimptemplate.c
      	* app/display/gimpdisplayshell-dnd.c
      	* app/text/gimptext-compat.c
      	* app/tools/gimptexttool.c
      	* app/tools/gimpvectortool.c
      	* app/vectors/gimpvectors-import.c
      	* app/vectors/gimpvectorsundo.c
      	* app/widgets/gimpchanneltreeview.c
      	* app/widgets/gimpitemtreeview.[ch]
      	* app/widgets/gimplayertreeview.c
      	* app/widgets/gimptoolbox-dnd.c
      	* app/widgets/gimpvectorstreeview.c
      	* app/xcf/xcf-load.c
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
      	unless it's a new image like when loading and XCF file).
      
      	* app/pdb/image-cmds.c
      	* app/pdb/paths-cmds.c: regenerated.
      
      
      svn path=/trunk/; revision=27200
      0e4a35a2
  31. 30 Sep, 2008 1 commit
    • Michael Natterer's avatar
      Bug 546924 – "New Image" misscalculating dimensions for non-pixel sized · 6865bb9e
      Michael Natterer authored
      2008-09-30  Michael Natterer  <mitch@gimp.org>
      
      	Bug 546924 – "New Image" misscalculating dimensions for non-pixel
      	sized templates
      
      	* app/core/gimptemplate.h: added private param flag
      	GIMP_TEMPLATE_PARAM_COPY_FIRST.
      
      	* app/core/gimptemplate.c (gimp_template_class_init): set the flag
      	on the resolution properties.
      
      	* app/dialogs/image-new-dialog.c (image_new_template_changed):
      	make sure the resolution properties are copied first.
      
      	* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): remove
      	comment about fixing the template editor. That's not true any
      	more.
      
      
      svn path=/trunk/; revision=27091
      6865bb9e
  32. 17 Sep, 2008 2 commits
    • Michael Natterer's avatar
      Revert the change which adds GError parameters to · 68c21b49
      Michael Natterer authored
      2008-09-17  Michael Natterer  <mitch@gimp.org>
      
      	Revert the change which adds GError parameters to
      	gimp_image_add_{channel,layer,vectors}():
      
      	* app/actions/channels-commands.c
      	* app/actions/edit-commands.c
      	* app/actions/layers-commands.c
      	* app/actions/vectors-commands.c
      	* app/core/gimp-edit.c
      	* app/core/gimpimage-duplicate.c
      	* app/core/gimpimage-merge.c
      	* app/core/gimpimage-quick-mask.c
      	* app/core/gimpimage.[ch]
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimpselection.c
      	* app/core/gimptemplate.c
      	* app/display/gimpdisplayshell-dnd.c
      	* app/text/gimptext-compat.c
      	* app/tools/gimptexttool.c
      	* app/tools/gimpvectortool.c
      	* app/vectors/gimpvectors-import.c
      	* app/widgets/gimpchanneltreeview.c
      	* app/widgets/gimpitemtreeview.[ch]
      	* app/widgets/gimplayertreeview.c
      	* app/widgets/gimptoolbox-dnd.c
      	* app/widgets/gimpvectorstreeview.c
      	* app/xcf/xcf-load.c: revert.
      
      	Instead, fix it at the PDB level:
      
      	* app/core/gimpimage.c: turn the "added to wrong image" warning
      	into a g_return_val_if_fail() assertion.
      
      	* app/pdb/gimppdb-utils.[ch] (gimp_pdb_item_is_floating): add a
      	"dest_image" parameter and fail if the passed item is not for this
      	image.
      
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/layer.pdb
      	* tools/pdbgen/pdb/paths.pdb: pass the dest image to
      	gimp_pdb_item_is_floating().
      
      	* app/pdb/image-cmds.c
      	* app/pdb/layer-cmds.c
      	* app/pdb/paths-cmds.c: regenerated.
      
      
      svn path=/trunk/; revision=26970
      68c21b49
    • Michael Natterer's avatar
      add GError parameter to gimp_image_add_{channel,layer,vectors}() and · b0dab70d
      Michael Natterer authored
      2008-09-17  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage.[ch]: add GError parameter to
      	gimp_image_add_{channel,layer,vectors}() and remove calls to
      	g_warning(). Changed checks to be possible failures at all.
      
      	* app/widgets/gimpitemtreeview.h (GimpAddItemFunc): add the GError
      	here too.
      
      	* app/actions/channels-commands.c
      	* app/actions/edit-commands.c
      	* app/actions/layers-commands.c
      	* app/actions/vectors-commands.c
      	* app/core/gimp-edit.c
      	* app/core/gimpimage-duplicate.c
      	* app/core/gimpimage-merge.c
      	* app/core/gimpimage-quick-mask.c
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimpselection.c
      	* app/core/gimptemplate.c
      	* app/display/gimpdisplayshell-dnd.c
      	* app/text/gimptext-compat.c
      	* app/tools/gimptexttool.c
      	* app/tools/gimpvectortool.c
      	* app/vectors/gimpvectors-import.c
      	* app/widgets/gimpchanneltreeview.c
      	* app/widgets/gimpitemtreeview.c
      	* app/widgets/gimplayertreeview.c
      	* app/widgets/gimptoolbox-dnd.c
      	* app/widgets/gimpvectorstreeview.c
      	* app/xcf/xcf-load.c: pass a NULL error.
      
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/paths.pdb: pass the error.
      
      	* app/pdb/image-cmds.c
      	* app/pdb/paths-cmds.c: regenerated.
      
      
      svn path=/trunk/; revision=26963
      b0dab70d
  33. 21 Mar, 2008 2 commits
  34. 06 Jun, 2007 2 commits