Commit Graph

46 Commits

Author SHA1 Message Date
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Tobias Ellinghaus fff0717632
PFM: Fix writing with ',' as decimal separator
Some locales (like German) use ',' as the decimal separator, so using
printf like functions to output a float value fails when the result
should always use '.'. Since there are only two distinct possibilities
we just write the string representation and be done with it.
2018-04-16 23:54:45 +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
Daniel P. Berrange ad9ccc4b58 Bug 778990 - PNM file plugin doesn't preserve 16-bit image precision
Save PNM in 16-bit format with max value of 65536 if the
image precision is not U8.
2017-02-22 12:52:33 +01:00
Daniel P. Berrange c87543aaac Bug 778990 - PNM file plugin doesn't preserve 16-bit image precision
Create a U16 precision image if loading a PNM file with
a max value greater than 255
2017-02-22 12:52:03 +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
Mihail Zenkov 3ab1389b9b Bug 770600 - Fix broken export to PBM
Use the drawable's (indexed bitmap) format instead of "Y' u8" when
exporting to PBM, this got broken when porting to GEGL.
2016-09-04 17:20:52 +02:00
Tobias Ellinghaus 74a249cabe
plug-ins: Don't leak the gegl buffer in pnm loader 2016-04-19 01:20:28 +01:00
Jehan ec27b539ea plug-ins: various s/save/export/ replacement on visible strings. 2016-02-16 02:35:43 +01:00
Mukund Sivaraman 932401e051 file-pnm: Don't write comments into PFM files 2015-01-21 15:24:22 +05:30
Mukund Sivaraman 51e4491fbf file-pnm: Add support for saving PFM (portable floatmap) files in color and gray 2015-01-20 21:44:06 +05:30
Mukund Sivaraman b6095b6fa5 file-pnm: Fix direction of progressbar during load ;) 2015-01-20 21:07:59 +05:30
Mukund Sivaraman 19f4843c66 file-pnm: Bump rate of progress update when saving 2015-01-20 21:03:24 +05:30
Mukund Sivaraman c05853885a file-pnm: Pass format to gegl_buffer_get() to fix saving from other formats 2015-01-20 21:00:08 +05:30
Mukund Sivaraman 013e943b6c file-pnm: Wrap to 80 columns 2015-01-18 06:55:56 +05:30
Tobias Ellinghaus 1c283737e5 plug-ins: add PFM reading support to file-pnm
Thanks muks for cleaning this up
2015-01-16 15:37:24 +01:00
Michael Natterer 849481a861 Clean up code around calls to g_file_replace()
- use G_FILE_CREATE_NONE instead of 0
- don't put "Could not open <file> for writing: <error>" around the
  returned error, the returned message is already verbose
2014-10-04 02:44:54 +02:00
Michael Natterer 14978bfe5d Simplify calls to g_output_stream_write_all()
It returns TRUE only if all bytes were written, so there is no need to
get and check the bytes_written return value.
2014-09-07 20:30:14 +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 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
Michael Natterer 01db58f6d0 plug-ins: cleanup in file-pnm 2013-10-03 22:06:24 +02:00
Michael Natterer aa7e9edc36 plug-ins: port file-p*m-save to GIO 2013-10-03 21:44:24 +02:00
Michael Natterer ec82d075b8 plug-ins: port file-pnm-load to GIO 2013-10-03 19:59:54 +02:00
Clayton Walker 264d09b417 Rename colour and greyscale to color and grayscale respectively 2013-06-06 23:26:16 +02:00
Massimo Valentini ac98dd4751 Bug 701120: Opening fuzzed .pnm-file causes stack buffer overflow
increase BUFLEN to avoid appending the nul terminator '\0'
past the end of 'buf'
2013-06-01 17:30:43 +02:00
Massimo Valentini d93d2e71c3 Bug 670226 - pbm image non-interactive different from interactive
Properly set the "pbm" flag in non-interactive mode, also add a
missing "break" so non-interactive actually behaves like
non-interactive.
2013-01-19 18:46:53 +01:00
Michael Natterer 0b48c55fc3 plug-ins: port file-pnm to GEGL 2012-11-26 01:32:12 +01:00
Mukund Sivaraman deea484a70 file-pnm: Write help text for file-pnm-load 2011-12-06 20:43:55 +05:30
Mukund Sivaraman 7af0494495 file-pnm: Fix strings including case changes 2011-12-06 20:42:30 +05:30
Mukund Sivaraman 2452183de1 file-pnm: ASCII is an acronym 2011-12-06 20:37:42 +05:30
Mukund Sivaraman cf4d270908 file-pnm: Handle psvals.raw as boolean valued int 2011-10-03 11:08:16 +05:30
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
Mukund Sivaraman 647f0ada2a Add support for reading 16-bit raw PPM files
This should be useful for loading the output of programs such
as dcraw.
2011-03-26 15:09:59 +05:30
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
Sven Neumann b883d59411 Bug 606372 - Saving to .ppm fails on indexed colorspace
Don't change the pointer to the colormap and then attempt to free it.
2010-01-09 12:12:12 +01:00
Martin Nordholts 19fe919dce plug-ins: Port file plug-ins to new export API 2009-07-21 16:03:58 +02:00
Michael Natterer e805cb0cf4 Use gtk_dialog_get_content_area() instead of dialog->vbox 2009-07-15 18:57:12 +02:00
Michael Natterer 6049768abf Bug 578630 - File Creation Permission Bug Only for Some File Types: Creating as 644 (rw-r--r--) when should be 664 (rw-rw-r--)
Use 0666 as permissions instead of 0644 and let the user's umask care
about restricting, so creating a file with open() behaves the same way
as with fopen().
2009-06-15 19:28:06 +02:00
Sven Neumann afc35ae7e2 Bug 573695 – 1-bit white background saved as PBM becomes all black
2009-03-12  Sven Neumann  <sven@gimp.org>

	Bug 573695 – 1-bit white background saved as PBM becomes all 
black

	* plug-ins/common/file-pnm.c: look at the colormap and test 
which
	of the two colors is black and which is white.


svn path=/trunk/; revision=28144
2009-03-12 22:18:44 +00:00
Sven Neumann f8265c5fc7 Bug 573695 – 1-bit white background saved as PBM becomes all black
2009-03-05  Sven Neumann  <sven@gimp.org>

	Bug 573695 – 1-bit white background saved as PBM becomes all 
black

	* plug-ins/common/file-pnm.c: need to handle the special case 
that
	the image colormap has only one entry.


svn path=/trunk/; revision=28104
2009-03-05 14:08:56 +00:00
Michael Natterer 4ea1437646 plug-ins/common/*.c plug-ins/color-rotate/color-rotate.c
2009-01-19  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/*.c
	* plug-ins/color-rotate/color-rotate.c
	* plug-ins/file-bmp/bmp.c
	* plug-ins/file-faxg3/faxg3.c
	* plug-ins/file-fits/fits.c
	* plug-ins/file-fli/fli-gimp.c
	* plug-ins/file-ico/ico.c
	* plug-ins/file-jpeg/jpeg.c
	* plug-ins/file-psd/psd-save.c
	* plug-ins/file-psd/psd.c
	* plug-ins/file-sgi/sgi.c
	* plug-ins/file-uri/uri.c
	* plug-ins/file-xjt/xjt.c
	* plug-ins/flame/flame.c
	* plug-ins/fractal-explorer/fractal-explorer.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gimpressionist/gimp.c
	* plug-ins/gradient-flare/gradient-flare.c
	* plug-ins/help-browser/help-browser.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/lighting/lighting-main.c
	* plug-ins/map-object/map-object-main.c
	* plug-ins/maze/maze.c
	* plug-ins/metadata/metadata.c
	* plug-ins/pagecurl/pagecurl.c
	* plug-ins/print/print.c
	* plug-ins/pygimp/gimpfu.py
	* plug-ins/script-fu/script-fu-script.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/selection-to-path/selection-to-path.c
	* plug-ins/twain/twain.c
	* plug-ins/win-snap/winsnap.c: document the "run-mode" parameter
	as we document enums for core procedures.


svn path=/trunk/; revision=27922
2009-01-19 20:11:36 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Sven Neumann edabd739d4 plug-ins/common/file-pnm.c plug-ins/common/file-ps.c for the most common
2008-08-18  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/file-pnm.c
	* plug-ins/common/file-ps.c
	* plug-ins/common/file-psp.c: for the most common errors, pass 
the
	error message with the return values instead of calling
	gimp_message().


svn path=/trunk/; revision=26639
2008-08-18 06:53:21 +00:00
Michael Natterer 3d75c95f95 plug-ins/bmp/* plug-ins/faxg3/* plug-ins/fits/* plug-ins/fli/*
2008-08-11  Michael Natterer  <mitch@gimp.org>

	* plug-ins/bmp/*
	* plug-ins/faxg3/*
	* plug-ins/fits/*
	* plug-ins/fli/*
	* plug-ins/ico/*
	* plug-ins/jpeg/*
	* plug-ins/psd/*
	* plug-ins/sgi/*
	* plug-ins/uri/*
	* plug-ins/xjt/*: removed these...

	* plug-ins/file-bmp/*
	* plug-ins/file-faxg3/*
	* plug-ins/file-fits/*
	* plug-ins/file-fli/*
	* plug-ins/file-ico/*
	* plug-ins/file-jpeg/*
	* plug-ins/file-psd/*
	* plug-ins/file-sgi/*
	* plug-ins/file-uri/*
	* plug-ins/file-xjt/*: and moved them here. Changed executable
	names to "file-foo".

	* plug-ins/Makefile.am: changed accordingly.

	* plug-ins/common/*: rename all file plug-ins to file-foo.c. Get
	rid of the names "poppler" and "postscript" and call them
	"file-pdf" and "file-ps" because the conflict with standard
	autofoo targets is gone.

	* plug-ins/common/plugin-defs.pl: changed accordingly.

	* plug-ins/common/mkgen.pl: make sure cflags variables are named
	"PLUG_IN_NAME_CFLAGS" and not "PLUG-IN-NAME_CFLAGS"

	* plug-ins/common/Makefile.am: regenerated.

	* configure.in: change folders and variable names to match above
	changes.


svn path=/trunk/; revision=26494
2008-08-11 10:06:13 +00:00