Commit Graph

36777 Commits

Author SHA1 Message Date
Michael Natterer a659036b40 app: switch the list of tools to using "append" mode
and ret rid of registering tools in reverse order, and reversing the
list after deserializing it.
2016-05-01 16:05:44 +02:00
Michael Natterer 0ab6e6be69 app: make sure the last *visible* layer is displayed in normal mode
The bottom visible layer must be rendered in normal mode because
every other mode on top of nothing renders nothing.

Before, we would display a stack's last layer in normal mode, which
was a braindead attempt to make the layer stack look like in 2.8. Now
we set GimpFilter's "is-last-node" property the right way by looking
at the filters' visibility in GimpFilterStack.
2016-05-01 15:38:36 +02:00
Michael Natterer 39909b6008 app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
2016-05-01 15:22:44 +02:00
Michael Natterer 7ae81e70b9 app: move the "visible" property from GimpItem to GimpFilter
Same for the "visibility_changed" signal. GimpItem keeps its
visibility API because it adds undo over GimpItem's API.
2016-05-01 14:27:43 +02:00
Piotr Drąg c11c61d00e Updated Polish translation 2016-05-01 12:43:54 +02:00
Michael Natterer 8c107963e6 app: implement GimpColorManaged in GimpDrawable
so now all drawables have a profile. Default to the babl format's
bultin profile and override to use the image's format in GimpLayer.
2016-04-30 23:41:32 +02:00
Michael Natterer 5c57885ac3 app: add ellipses to the color mode conversion menu items
if they show a dialog.
2016-04-30 19:41:09 +02:00
Michael Natterer 329d5c0a0f app: #include gimp-babl.h in gimpimage-convert-type.c 2016-04-30 18:50:23 +02:00
Michael Natterer 5aff776a8a app: rename convert-type-dialog.[ch] to convert-indexed-dialog.[ch] 2016-04-30 18:49:02 +02:00
Michael Natterer 182da6d2e9 Bug 765176 - ICC profile conversions between grayscale and RGB images
When converting between RGB and GRAY and the image has a profile,
invoke the convert profile dialog with the newly added image type
conversion feature.
2016-04-30 18:35:52 +02:00
Michael Natterer 12f9aa9bd2 Bug 765176 - ICC profile conversions between grayscale and RGB images
Add a dest_profile parameter to gimp_image_convert_type() so a profile
can be chosen when converting between RGB and GRAY. Has no GUI yet.
2016-04-30 18:35:52 +02:00
Michael Natterer 33adec2a3e app: add gimp_image_validate_color_profile_by_format()
which checks if a color profile is suited for pixels of a Babl format.
2016-04-30 18:35:52 +02:00
Michael Natterer 1cf04cc4b9 app: prepare the color profile dialog for doing RGB <-> GRAY conversion
Get rid of individual constructors for assign and convert, instead
have one constructor that takes a dialog type enum. No new features
yet in this commit.
2016-04-30 18:35:52 +02:00
Michael Natterer ef8b802032 app: move indexed conversion to gimpimage-convert-indexed.[ch]
It's so much code and takes so many additional parameters over RGB and
GRAY conversion, it got its own place and function now.
2016-04-30 18:35:52 +02:00
Michael Natterer 4086932e8d app: tiny and completely irrelevant stylistic cleanup 2016-04-30 18:35:52 +02:00
Michael Natterer ef4ab94a12 app: change GimpDrawable::convert_type() to take a target profile
instead of just a boolean "convert_profile". This takes the logic to
figure the right target profile out of gimp_layer_convert_type(), it
can't possibly know everything about how to convert anyway, and having
the logic in the callers conveniently splits it up and distributes its
parts to the places they belong.

This commit should cause no behavor change and is just preparation for
fixing bug 765176.
2016-04-30 18:35:52 +02:00
Balázs Meskó 3708f50fd9 Updated Hungarian translation 2016-04-30 12:45:51 +00:00
Kristian Rietveld fb5d4ac076 pygimp: remove calls to gimp_context_set_transform_recursion
This deprecated function is currently a no-op anyway.
2016-04-29 21:35:43 +02:00
Kristian Rietveld bb4cb5b4c1 pygimp: fix typo 2016-04-29 21:35:43 +02:00
Kristian Rietveld 6746e502c2 pygimp: fix implicit enum casts 2016-04-29 21:35:43 +02:00
Kristian Rietveld 04ef2c34db pygimp: python-console: ensure initial width of 80 characters 2016-04-29 21:35:43 +02:00
Kristian Rietveld 2f1c947abc pygimp: pyconsole: set up a default size of 80x40 characters
A default width of 80 characters makes Python help readable by default.
2016-04-29 21:35:42 +02:00
Kristian Rietveld cd5dfb8642 pygimp: pyconsole: use appropriate Pango function to estimate char width 2016-04-29 21:35:42 +02:00
Kristian Rietveld d9bb8d18f9 pygimp: pyconsole: replace raw_input builtin with modal raw input
We need to run raw_input in modal mode, such that we can return the
text that has been entered as the return value. This makes the use
of "raw_input()" within the pyconsole work as well as makes "help()"
not get stuck (it was blocking on input on stdin).
2016-04-29 21:35:42 +02:00
Kristian Rietveld 229285379b pygimp: pyconsole: comment the code a bit
So the code can be understood by mere mortals like me.
2016-04-29 21:35:42 +02:00
Kristian Rietveld a795c1c4ff pygimp: pyconsole: coding style 2016-04-29 21:35:42 +02:00
Kristian Rietveld 21a4999230 pygimp: pyconsole: remove unused method 2016-04-29 21:35:42 +02: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
Marco Ciampa 1c4fc5620f Updated Italian translation 2016-04-29 08:47:17 +02:00
João S. O. Bueno 207e904d7a Bug 765685: Disambiguates octal-escaped output in c-source image output
Fixes the plug-in output to render decimal digit
characters as octal escaped, so they can't be acidentally
combined in preceding escaped sequences. (i.e. the sequence
of values '255, 49'  is now rendered as '\377\049' instead of
 '\3771')

Thanks Steve Baker for noticing and reporting the issue.
2016-04-27 23:46:19 -03:00
Michael Natterer 52af9145d7 libgimpcolor: handle palette formats in gimp_color_profile_get_format()
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.
2016-04-27 00:48:23 +02:00
Michael Natterer 3a34a2b54c Bug 764320 - Xsane Gimp no device dialog
Pass the run_mode again to GIMP_EXTENSION plug-ins, this got lost in
the cleanup in commit dda06ac065.
Spotted by Massimo.
2016-04-26 16:10:08 +02:00
Tobias Ellinghaus 68b91cc9f6
plug-ins: Get an image size when creating thumbs with darktable
The reported size isn't very precise but close enough to get an idea of
what you will get. The problem is that raw files always have some unused
regions that get cropped away later.
Another source of discrepancy can be manual cropping by the user in
darktable, but there isn't much we can do about that.
2016-04-26 13:38:33 +02:00
Tobias Ellinghaus 980b08e380
plug-ins: Don't start darktable when creating thumbnails
... instead use the non-interactive darktable-cli. This is still
somewhat work in progress as the image size isn't returned yet.
2016-04-26 01:03:35 +02:00
Tobias Ellinghaus 9888824730
plug-ins: Try harder to export an image from darktable
Before there wouldn't be any intermediate file being written when
darktable sees more than one XMP file. Now the first image in its
temporary database gets exported.
2016-04-25 15:34:36 +02:00
Michael Natterer eca44cc87d app: fix file_check_magic_list() to handle "and" matches again
where the magic is only supposed to match if all magics in the "and"
list match.
2016-04-25 01:04:07 +02:00
Michael Natterer f3502d72b3 plug-ins: add a magic for Nikon NEF files to file-darktable
...which I hope is the right one...
2016-04-25 00:35:39 +02:00
Michael Natterer 6af83a5a08 app: improve file magic matching
Change file magic matching from using a simple boolean "magic matches"
logic to using a matching quality. The quality is measured by the
number of bytes that matched.

Matching a single file procedure's magics now tries all magics and
returns the best match quality.

Searching a file procedure for a given file now tries all file
procedures and returns the one with the best match quality.

This fixes raw camera files being opened as TIFF, given a better magic
than just the generic TIFF magic is provided.
2016-04-24 23:56:57 +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 8e52057e8c plug-ins: use the right magic for Canon CR2 files
and some general code cleanup.
2016-04-24 23:30:25 +02:00
Michael Natterer 1263552f24 libgimp: don't #define TILE_HEIGHT gimp_tile_width()
Fortunately, tile width and height were alyways the same.
2016-04-24 20:04:42 +02:00
Massimo Valentini 022439e463 Bug 765492: Memory leak in gimp_brush_cache_add
g_free the lru 'unit' when removed from the cache

and keep track of the list length and last item
while looking for a duplicate already present in
the cache.
2016-04-24 19:41:22 +02:00
Michael Natterer 19738412ce app: simplify gimp_image_convert_type()
It's pretty pointless to have 5 differently-styled if(INDEXED) blocks
after each other, with zero non-INDEXED code in between.
2016-04-24 00:55:04 +02:00
Jehan 77a68e00af Bug 765459 - Artifacts symmetry painting with big brushes.
Use gegl_node_blit() instead of gegl_node_process() as proposed by
Massimo in the bug report.
2016-04-24 00:01:45 +05:30
Piotr Drąg 7433c65c84 Updated Polish translation 2016-04-23 14:19:56 +02:00
Michael Natterer 785c104c69 plug-ins: more code cleanup in file-bmp
Use GLib endian macros in bmp-save.c
2016-04-23 01:07:20 +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
Massimo Valentini a3f4c50b3e Bug 765411: CRITICAL warnings loading an xcf with...
"exif-data" parasite

To migrate old "exif-data" parasites to GimpMetadata
an exif-only jpeg file is generated in memory, but its
APP1 marker length was 2 bytes short resulting in a
CRITICAL warning:

** (gimp-2.9:9): CRITICAL **: Directory Photo: IFD exceeds data buffer, cannot read next pointer.

Properly terminating the jpeg with an EOI marker also
gets rid of the WARNING:

** (gimp-2.9:9): WARNING **: JPEG format error, rc = 5
2016-04-22 17:30:44 +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