1. 19 Jan, 2018 2 commits
    • Jehan's avatar
      Bug 792657 - A useless error message when cancelling opening a .svgz. · c548d5d3
      Jehan authored
      Use the new gimp_get_pdb_status() to forward the error returned by
      gimp_file_load(). Previous code was always returning
      GIMP_PDB_EXECUTION_ERROR when the file load was failing, but this was
      not granular enough. In particular when the file load is actually
      interactively cancelled through Esc or the "Cancel" button, we don't
      want to display an error message on screen. Therefore we forward the
      actual error raised by the underlining plug-in.
      c548d5d3
    • Jehan's avatar
      plug-ins: indentation fix. · 911e46ee
      Jehan authored
      So minor! But while I was reading this code, I just couldn't just leave
      this one indentation unfixed. ;P
      911e46ee
  2. 14 Jan, 2018 1 commit
  3. 13 Jan, 2018 2 commits
    • Jehan's avatar
      plug-ins: check pointer before freeing. · 4849d410
      Jehan authored
      Thanks to Massimo for notifying about it.
      4849d410
    • Jehan's avatar
      plug-ins: implement RGBE exporting through GEGL. · dcd4e464
      Jehan authored
      While we are at it, let's just add RGBE exporting. It's just as easy.
      
      Also rename s/file-gegl-load-rgbe/file-load-rgbe/. All formats just use
      the "file-FORMAT-(load|save)" naming for their procedure, even when
      implemented directly through "gegl:load|save".
      dcd4e464
  4. 12 Jan, 2018 2 commits
  5. 11 Jan, 2018 2 commits
  6. 10 Jan, 2018 3 commits
    • Jehan's avatar
      Bug 790552 - do not save metadata by default. · 096debb0
      Jehan authored
      This is a privacy concern. Whereas importing metadata is usually a good
      idea, exporting it should be a conscious action. A lot of private data
      can be leaked through metadata and many people don't realize it (which
      also usually means they don't need it). On the other hand, the people
      who realize it are the ones who would explicitly edit the metadata and
      check what they want to be exported or not.
      
      This is only a first step. Some people may want to always export the
      metadata and for these people, there should be abilities to change the
      default.
      096debb0
    • Jehan's avatar
      plug-ins: fix some coding-style issues in metadata-editor. · bc503201
      Jehan authored
      Mostly missing spaces here and there fixed with search and replace
      followed by manual verification and retouching.
      bc503201
    • Jehan's avatar
      plug-ins: metadata-editor crashes when strtok() initialized with NULL. · 62ee5d3c
      Jehan authored
      When running strtok() the first time, it needs to be non-NULL so we must
      check for the string. This is even more important because NULL actually
      has a special meaning in strtok() to indicate further search on the same
      string, in a stateful way. So searching with NULL at first call was
      crashing the metadata editor plug-in in my case.
      I could also imagine it could have reused strings from previous
      searches, mixing metadata contents in some edge cases. Anyway that would
      be bad as well!
      
      While I was there, I also checked for non-null search string before
      strstr() calls, when there was not already such a check before. This
      function also requires non-NULL haystack argument.
      It feels like this code doesn't do much validity checks, and it's likely
      there are more similar issues. I haven't reviewed the whole code, only
      this part which was crashing here.
      62ee5d3c
  7. 09 Jan, 2018 2 commits
    • Jehan's avatar
      plug-ins, themes: use the "normal text" color as stdout color of... · 657c39dc
      Jehan authored
      ... the python console.
      It was using "selected text", which is most often inverted color (close
      if not identical to the background color). As a consequence, it made
      stdout output unreadable by default, forcing themes to always define a
      style for the python console. Using "normal text" is a much better
      choice to default to something readable from a parent style.
      
      As a consequence, I also removed "python-fu-console" styling from the
      System theme, where there should be as few theming as possible.
      657c39dc
    • Massimo Valentini's avatar
      Bug 753736: GIMP Python green prompt is virtually... · e663526d
      Massimo Valentini authored
      ... unreadable to those with certain type of color blindness
      e663526d
  8. 08 Jan, 2018 3 commits
  9. 07 Jan, 2018 4 commits
    • Jehan's avatar
      plug-ins: update the warning message for dimension of X bitmap cursors. · 22a6e2bb
      Jehan authored
      After discussing with Mitch and understanding better the X bitmap/pixmap
      history, I make the warning more specific to X bitmap cursors only (not
      pixmap).
      Also I can see our code always exports RGBA data, so I am not quite sure
      if this warning even makes sense since X bitmaps are bicolor maps. On
      the other hand, Mitch tells me that "these days gdk turns pixbufs into
      bitmaps if the x server doesn't support rgba cursors", so maybe that can
      still be of use to warn cursor designers for max compatibility.
      Still that's pretty old compatibility stuff, so let's replace "may" by
      "might".
      22a6e2bb
    • Jehan's avatar
      575013fe
    • Jehan's avatar
      plug-ins: discard leading 0s in regular expression for cursor size/delay · df933c7b
      Jehan authored
      Leading 0s have no special value, we use base 10 anyway. Removing
      leading 0s allows to not trigger the 8-digit test, hence modify a valid
      cursor size unecessarily.
      df933c7b
    • Jehan's avatar
      Bug 792266 - Increase maximum size of x11 cursor during export. · 0484ce83
      Jehan authored
      We were basing our max export size on a macro value defined in
      libXCursor code: MAX_BITMAP_CURSOR_SIZE. This macro is still defined in
      libXCursor and still has the same value (64), yet it is unsure how far
      or even where this is enforced since it seems we can get at least 96px
      cursors in GNOME/X11.
      
      As a consequence, this commit:
      - still warns when cursor size is over this value, with more explicit
        text, yet does not change the cursor size anymore! So it is now
        possible to export bigger cursors, but you still get a warning.
      - only changes the cursor size for the existing more-than-8-digits test
        and I add a warning when it does so (we should never modify an image
        silently!).
      - adds the size 96 as not triggering the warning about GNOME Settings
        since it definitely looks like this size is valid there (according to
        my own empirical tests). Also since 96 is higher than the libXCursor
        current MAX macro value, this really raises the question to where this
        max is enforced and whether we should not just drop the first warning.
      
      Note that it breaks a bit the string freeze since I modify one string
      and adds one. Sorry for this!
      0484ce83
  10. 06 Jan, 2018 2 commits
  11. 05 Jan, 2018 2 commits
  12. 04 Jan, 2018 1 commit
  13. 01 Jan, 2018 4 commits
    • Michael Natterer's avatar
      Bug 776994 - Gimp fails to open corrupted JPG image · abcf372d
      Michael Natterer authored
      Load as much of a broken/truncated JPEG as possible:
      
      As soon as loading the scanlines has started, set a new setjmp()
      location that doesn't abort loading alltogether but keeps the loaded
      part of the image.
      abcf372d
    • Tobias Stoeckmann's avatar
      Bug 789612 - Prevent heap overflow in GBR parser · 764056e1
      Tobias Stoeckmann authored
      It is possible to trigger a heap overflow with insanely large GBR
      files with a deprecated file format on 32 bit systems.
      
      The problem is that old versions of GBR allowed an additional pattern
      after the brush data. These patterns have always 4 bytes per pixel,
      but the initial size check is performed with the bytes per pixel of
      the brush, which can be different.
      
      If the brush has 1 byte per pixel and the dimensions are sufficiently
      large, this can trigger a heap overflow with attacker-controlled
      amount and content of data.
      Signed-off-by: Tobias Stoeckmann's avatarTobias Stoeckmann <tobias@stoeckmann.org>
      764056e1
    • Massimo Valentini's avatar
      Bug 783336: exported openraster (.ora) missing... · cd4a0a18
      Massimo Valentini authored
      ...mergedimage.png
      
      fix also the thumbnail creation, that:
      must be 8 bit; should not be upscaled; should not have frame
      or decoration, that I interpreted as when there are transparent
      areas they should not be blended with a background color,
      so instead of image_flatten use  image_merge_visible_layers
      (also for the merged_image)
      cd4a0a18
    • Alexis Wilhelm's avatar
      Bug 663576 - make -C plug-ins/script-fu check-for-deprecated-procedures-in-script-fu... · a51efd09
      Alexis Wilhelm authored
      ...lists files that do not use deprecated functions
      
      Better regex that matches the right stuff.
      a51efd09
  14. 31 Dec, 2017 2 commits
  15. 29 Dec, 2017 1 commit
  16. 26 Dec, 2017 3 commits
  17. 25 Dec, 2017 1 commit
  18. 23 Dec, 2017 1 commit
  19. 22 Dec, 2017 2 commits
    • Jehan's avatar
      Bug 791514 - Cannot export to webp file. · 317f7fa5
      Jehan authored
      fopen() modes "wb+" and "w+b" are aliases of the same opening mode
      (truncate/create in binary read/write). But it turns out that Windows
      implementation does not understand "wb+". The alias "w+b" works fine in
      my tests.
      317f7fa5
    • Jehan's avatar
      plug-ins: clean the rest of the file-fli plug-in. · eb218190
      Jehan authored
      While I am at it, let's just do all the files in there. Other also had a
      bunch of tabs and wrong coding style.
      eb218190