Commit Graph

34 Commits

Author SHA1 Message Date
Michael Natterer 6bca8c4f89 pdb, app, libgimp, plug-ins: replace most PDB filenames/URIs by GFile
and in an attack of madness, changes almost all file plug-in
code to use GFile instead of filenames, which means passing
the GFile down to the bottom and get its filename at the very
end where it's actually needed.
2019-09-11 21:48:34 +02:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00
Michael Natterer 8a78203aed Properly prefix the values of enum GimpPDBProcType
to be GIMP_PDB_PROC_TYPE_PLUGIN, _EXTENSION etc.
2019-08-30 12:52:28 +02:00
Jehan 1b6e6b9b53 plug-ins: port file-exr to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan e0d50aa121 plug-ins: keep building all plug-ins with old API.
Build existing plug-ins with -DGIMP_DEPRECATED_REPLACE_NEW_API.
We will port the plug-ins one at a time to the new GimpImage API.
2019-08-22 15:54:36 +02:00
Michael Natterer 4cb4b3ef3a plug-ins: port all plug-ins to the new macros 2019-08-20 01:03:38 +02:00
Michael Natterer 7edd28706f file-exr: use gimp_pdb_get_last_error() instead of gimp_get_pdb_error() 2019-08-15 19:03:09 +02:00
Michael Natterer c6fa23c22c plug-ins: port file-exr to GimpPlugIn 2019-08-15 19:00:10 +02:00
Michael Natterer d223522b8b plug-ins: suppress deprecation warnings from the OpenEXR headers
"Fix" straight from stackoverflow, I have no idea how this builds
on anything except gcc or clang.
2019-07-21 19:56:29 +02:00
Michael Natterer b07975aa88 plug-ins: cleanup, copyright headers, formatting in the openexr-wrapper 2019-06-26 16:56:12 +02:00
Michael Natterer f7413d70dd plug-ins: improve JPEG and EXR comment validation
If the comment doesn't UTF-8 validate, leave valid UTF-8 at the
beginning intact. Also fix character range comparison to use guchar
instead of gchar
2019-06-26 16:51:26 +02:00
Michael Natterer e2bacf918c plug-ins: improve/fix metadata handling in file-exr
Use gimp_image_metadata_load_finish() and pass the right flags
depending on whether comment and profile were loaded. Also, set the
profile before creating the layer so its space is correct
automatically.
2019-06-25 17:55:49 +02:00
Jehan 7a7ecda4f1 plug-ins: optionally define several float.h macros for MinGW64.
This plug-in failed to cross-build because these macros were not defined
in the `float.h` of my MinGW64 environment (and they are used in some
ilmbase headers). Just define them ourselves if they are absent. I do
this only on MinGW environment because these should really be defined on
Linux (and other UNIX-like, I guess?) and if they are not, we may have a
bigger issue.
2019-01-26 16:42:15 +01:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Jehan 870ca6334d plug-ins: install plug-ins in subfolder.
I am going to forbid plug-ins from being installed directly in the root
of the plug-ins/ directory. They will have to be installed in a
subdirectory named the same as the entry point binary.
This may seem useless for our core plug-ins which are nearly all
self-contained in single binaries, but this is actually a necessary
restriction to eliminate totally the DLL hell issue on Windows. Moving
core plug-ins in subfolders is only a necessary consequence for it.
2018-05-20 21:06:35 +02:00
Michael Natterer e16c8a2352 Move the new "default_new_layer_mode" APIs to the image...
...in both the core and libgimp.

Images now know what the default mode for new layers is:

- NORMAL for empty images
- NORMAL for images with any non-legacy layer
- NORMAL_LEGAVY for images with only legacy layers

This changes behavior when layers are created from the UI, but *also*
when created by plug-ins (yes there is a compat issue here):

- Most (all?) single-layer file importers now create NORMAL layers
- Screenshot, Webpage etc also create NORMAL layers

Scripts that create images from scratch (logos etc) should not be
affected because they usually have NORMAL_LEGACY hardcoded.

3rd party plug-ins and scripts will also behave old-style unless they
get ported to gimp_image_get_default_new_layer_mode().
2017-08-21 20:18:00 +02:00
Michael Natterer 838449254a plug-ins: use gimp_get_default_new_layer_mode() for most new layers
instead of hardcoding NORMAL_LEGACY.
2017-08-20 17:12:46 +02:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Tobias Ellinghaus 3d86a6c709
plug-ins: Use GIMP's internal profile when loading EXR
... when it's appropriate.
2016-04-29 13:10:30 +02:00
Michael Natterer dc3f276476 plug-ins: use the right magic for EXR files
and shorten a function name.
2016-04-24 23:31:25 +02:00
Michael Natterer e5a669bdfc libgimpbase: fix gimp_metadata_set_from_xmp() to really expect XMP
Don't skip the first 10 bytes. That code was there to skip the magic
"GIMP_XMP_1" of the old "gimp-metadata" parasite. Instead, properly
check for that magic in xcf_load_image() and pass only the actual XMP
to gimp_metadata_set_from_xmp(). Also remove the +10 hack in file-exr.
2016-04-22 22:49:06 +02:00
Tobias Ellinghaus 4e144fea69
plug-ins: Read Xmp data from EXR files
This commit needs review as it uses an ugly hack to make
gimp_metadata_set_from_xmp() do what it wants.
2016-04-22 17:01:58 +02:00
Tobias Ellinghaus e81cef7c03
plug-ins: Read comment and Exif data from EXR files 2016-04-22 14:41:34 +02:00
Michael Natterer 1d337877d8 plug-ins: some cleanup in file-exr 2016-04-18 19:06:41 +01:00
Michael Natterer b70ffb0c8b plug-ins: some cleanup in the new file-exr ICC profile code 2015-09-20 23:49:38 +02:00
Tobias Ellinghaus d73cfa4a24 plug-ins: support color managed EXR loading
This generates an ICC profile from the embedded white point and
chromaticities on the fly, assuming linear gamma images.
2015-09-20 23:42:24 +02:00
Michael Natterer f28878b6d3 plug-ins: start the progress before opening files for loading/saving
so the user gets feedback as early as possible.
2014-07-23 21:37:13 +02:00
Michael Natterer a4773a5599 plug-ins: include libgimp/gimp.h and gimpui.h in openexr-wrapper.cc
The file does not need the includes, but including libgimp from a C++
file makes sure the build fails if something forbidden gets added to
any public libgimp header, such as a struct member named "private".
2014-04-27 14:33:16 +02:00
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- 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.
2013-06-23 16:51:24 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Mukund Sivaraman 7946001235 file-exr: Fix loading of Fog.exr from openexr-images-1.7.0 2013-05-07 11:47:01 +05:30
Mukund Sivaraman 7a671d3157 file-exr: Fix a possible crash upon failure 2013-05-04 14:10:42 +05:30
Mukund Sivaraman 8d89efaff5 file-exr: Add initial implementation (loader)
This is a basic implementation of an OpenEXR loader. This
"infrastructure" is required for any further work. It consists of:

* The build system changes.

* A C wrapper around the OpenEXR library, which is necessary as it's not
  possible to intermix GIMP's code with C++ code.

* A basic image loader. Chroma is not supported currently, and some
  other weird files like multi-view files are unsupported. These can be
  added when necessary. There is no UI, but it should be straightforward
  to add new features like this on top of this work.
2013-05-04 13:02:54 +05:30