Commit Graph

66 Commits

Author SHA1 Message Date
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
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 f6a02b5665 plug-ins: cleanup in file-bmp
Rename files, functions, variables, remove globals, indent, foo.
2016-04-20 13:55:53 +01:00
Jehan ec27b539ea plug-ins: various s/save/export/ replacement on visible strings. 2016-02-16 02:35:43 +01:00
Mukund Sivaraman bcf16161e6 file-bmp: Use cleaner serialization (sign) 2014-10-03 11:58:42 +05:30
Mukund Sivaraman db18c1f172 file-bmp: Fix final bfSize patched into BMP header (#737669) 2014-10-03 11:10:26 +05:30
Philippe Teuwen 6e73a6278f file-bmp: Use masks when BI_BITFIELDS method is found 2014-08-28 19:30:20 +05:30
Mukund Sivaraman 24cf89aa68 file-bmp: Print compression method in debug build 2014-08-28 19:27:07 +05:30
Mukund Sivaraman 1d10c4d88f file-bmp: Fix format specifiers 2014-08-28 19:21:53 +05:30
Mukund Sivaraman 2dac58718f file-bmp: Remove unnecessary casts 2014-08-28 19:07:59 +05:30
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
Téo Mazars 54f83a5ba2 plug-ins: don't check biClrUsed if bpp > 8 (in bug 697431) 2014-01-30 20:35:45 +01:00
Michael Natterer 03df8c6af4 plug-ins: pass the format's name again in calls to gimp_export_image()
and clean up the formatting of the call and the lines around it. Now
we can check the various (disabled) export options for regressions
again by changing a single line in gimp_export_image().
2013-11-10 00:18:48 +01:00
Nils Philippsen 4664c1f479 file-bmp: don't close foreign FD in ReadImage() 2013-11-08 14:02:03 +01:00
Nils Philippsen 6467fbf65d file-bmp: don't leak file pointer when erroring out 2013-11-07 12:20:34 +01:00
Téo Mazars 56f065321c Bug 674391 - Indexed colours not exported when save a .bmp
It's about importing in fact.

Parse BITMAPV4HEADER / BITMAPV5HEADER and use GIMP's BMP
implementation instead of using gdk_pixbuf.

Also, remove an old hack about 32bits bmp v3 + alpha. The alpha
channel is already ignored in that case.
2013-08-03 19:46:39 +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
Kevin Cozens cc20c8d7f6 Fixed several typos. Minor whitespace changes. 2012-12-14 17:43:10 -05:00
Michael Natterer 67dda14e77 plug-ins: cleanup in the recently GEGL-ported plug-ins
Mostly formatting consistency paranoia.
2012-11-27 20:58:05 +01:00
Mukund Sivaraman 610aac1dac file-bmp: Don't use alpha channel with BI_RGB compression type
Don't use alpha channel with BI_RGB compression type in
BITMAPINFOHEADER images (bug #573090, bug #674398).
2012-10-08 09:12:25 +05:30
Mukund Sivaraman a19bbee5cb file-bmp: Reject compression type BI_ALPHABITFIELDS as unsupported
These were erroneously parsed before. Now we reject them.  It is
trivial to implement support for them, but we can't test it unless
someone comes up with a sample BMP file.  They don't seem to be
available in the wild.
2012-10-08 09:09:04 +05:30
Mukund Sivaraman 9818c4706a file-bmp: Change order of bytes (and the masks correspondingly) to please Firefox 2012-10-08 08:03:57 +05:30
Michael Natterer 244b3766bd plug-ins: port file-bmp to GEGL 2012-09-21 19:19:03 +02:00
Mukund Sivaraman 800f967930 file-bmp: Fix order of data in RGBA_8888 images
See #678250, #678252, etc. for example bug reports.

This fix should be sufficient in fixing BMP output, but it looks
like some apps like Firefox have broken BMP loaders which do not
care for the masks. We would have to change the masks for them.
2012-09-21 20:11:31 +05:30
Mukund Sivaraman b100b14111 file-bmp: All 16 and 32-bpp files need the masks to be written
See #678250, #678252, etc. for example bug reports.
2012-09-21 20:09:51 +05:30
Øyvind Kolås d1ced11415 plug-ins: add GEGL_CFLAGS to many Makefile.am's 2012-05-02 17:46:08 +02:00
Massimo Valentini a0e6941db1 Bug 669188: saving a monochrome bitmap picture ...
The colormap was being written within the DIB header.
It must follow both the mask and color space info.
2012-02-02 11:49:41 -05:00
Michael Natterer 9a4abedb98 plug-ins: fix indentation b0rk from previous commit 2012-01-31 21:28:12 +01:00
Kevin Cozens 2871093626 Bug 669074 - Corrected typo, spotted by David Allen, in BMP file signature. 2012-01-31 14:53:18 -05:00
Mukund Sivaraman 5c67d250ca file-bmp: Unmark string from translation 2011-12-06 21:18:56 +05:30
Michael Natterer dcb4c6e34a plug-ins: use gtk_box_new() 2011-09-30 12:18:24 +02:00
Martin Nordholts 7fea63a283 Bug 653757 - Bitmap export in Gimp 2.6.11 vs Bitmap Export in Gimp 2.7.3
Make writing BITMAPV5HEADER color space information optional since
there are compatibility problems with writing color space
information. Unity 3D and BlitzMax have been reported to not support
such BMP images.
2011-08-26 23:49:41 +02:00
Martin Nordholts bb02019aa0 plug-ins: Remember BMP options across invocations
There is no reason to not do that, especially since we soon will make
color space information in the BMP file optional.
2011-08-12 18:47:21 +02:00
Martin Nordholts 698d9ea28e plug-ins: bmp-write.c: encoded -> use_run_length_encoding 2011-08-12 18:47:21 +02:00
Mukund Sivaraman f93398b4cf file-bmp: Fix typo in comment 2011-05-08 23:33:17 +05:30
Mukund Sivaraman b3a4a00d29 file-bmp: Use BITMAPV5HEADER structure (bug #649741) 2011-05-08 22:57:39 +05:30
Mukund Sivaraman a713175375 file-bmp: Rewrite code 2011-05-08 22:10:20 +05:30
Mukund Sivaraman 4978f370fe file-bmp: Rewrite code 2011-05-08 21:22:31 +05:30
Michael Natterer 5c7660c6cc plug-ins: don't #include <libgimp/gimppixbuf.h> in bmp-read.c 2011-04-28 19:58:51 +02:00
Mikael Magnusson 8ff66342b8 plug-ins: set progress to 1.0 when done 2011-04-10 19:28:43 +02:00
Michael Natterer 8c4d99f883 Bug 645456 - Inconsistent window (role) naming scheme
Applied patch from Christoph Kappel which adds a "gimp-" prefix to all
plug-in dialog window roles.
2011-04-08 20:31:34 +02:00
Michael Natterer 38fd77f5e9 plug-ins: some more s/gtk_container_add/gtk_box_pack_start/ 2011-03-05 10:59:56 +01:00
Michael Natterer 97a73ea83f app: use gtk_box_pack_start() to pack a dialog's toplevel container
instead of gtk_container_add()'s because otherwise the widget will not
expand in GTK+ 3.x
2011-03-04 10:44:58 +01:00
Nelson A. de Oliveira 7666e5cf36 Fix memory and descriptor leaks 2010-11-12 21:56:17 +01:00
Michael Natterer bbd7ec6b5c plug-ins: port from gimp_image_add_foo() to gimp_image_insert_foo()
I'm sure some plug-ins need to add their items *not* at the toplevel,
but since making plug-ins really tree-aware is a lot more work than
just fixing insert positions, I went for passing -1 as parent in
almost all cases. And because of laziness...
2010-09-06 11:40:46 +02:00
Michael Schumacher e77dd90fc0 Bug 574018 - Add a manifest to executables
Created a resource file for plug-ins and a rule to link it to them.
The application icon file is smaller than the default one, there's no
point in doubling the size of a plug-in executable just for an icon.

If no problems turn up, this will close the bug.
2010-09-01 08:24:45 +02:00
Massimo Valentini ca43054f08 Bug 623290 - Save As... does not save Windows Bitmap as default in dialog
Connect to "toggled" signal of radio buttons.
2010-07-07 20:29:06 +02:00