Commit Graph

3450 Commits

Author SHA1 Message Date
Simon Budig 7928be2255 fix a few potential use-before-check errors
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:59:19 +02:00
Simon Budig 99abc566d4 fix some precedence errors
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:13 +02:00
Simon Budig 9a245989c0 fix bogus checks against unsigned variables.
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:13 +02:00
Michael Natterer 498ccd33ee plug-ins: move file-compressor to plug-ins/common/, it's only one .c file 2014-08-14 01:35:06 +02:00
Michael Natterer dae366bb6e configure.ac, *: require GLib 2.40.0
Remove gimp_output_stream_[v]printf() and use the new functions from
GLib instead. Use memmove() instead of the deprecated g_memmove().
2014-08-12 15:30:19 +02:00
Jehan 4ae597c586 plug-ins: use standard error on failed file descriptor in file-pdf-save.
The standard message used all over our code is:
"Could not open '%s' for writing: %s".
2014-07-29 16:59:49 +00:00
Jehan eaa4bf2270 Bug 733824 - PDF export fails without warning if open in other application.
This happens on the Windows platforms in particular where applications
can lock files, preventing GIMP to obtain a file descriptor for writing.
2014-07-29 15:41:34 +00: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 1859633018 plug-ins: #include <gdk/gdk.h> instead of <gdkconfig.h> 2014-07-21 02:19:51 +02:00
Massimo Valentini 35466d6dd0 Bug 732163 - Flipped pixel columns in TGA
do not flip the central columns twice
2014-07-20 16:16:50 +02:00
Michael Natterer b7863269f0 libgimpcolor: change gimp_lcms_profile_open_from_file() from filename to GFile
and change most of the lcms plug-in to using GFile too.
2014-07-04 23:57:27 +02:00
Michael Natterer b5530e9e3d Use the new GeglAccessMode enum instead of the old values 2014-07-02 02:00:35 +02:00
Michael Natterer 6914bbc65f plug-ins: more gimp_spin_button_new() -> gtk_spin_button_new() 2014-06-22 23:01:31 +02:00
Massimo Valentini 3b746e9a68 plug-ins: tiff-load call gimp_ui_init when run interactively 2014-06-16 19:33:23 +02:00
Michael Natterer ac9101691c plug-ins: various small cleanups in the plug-ins that use metadata 2014-06-05 21:33:40 +02:00
Michael Natterer 3a4fedea7c libgimp: make gimp_image_metadata_save_prepare() suggest GimpMetadataSaveFlags
Return flags based on what metadata is actually present in the image.
Returning of a suggested value for GIMP_METADATA_SAVE_THUMBNAIL needs
support from gimp_image_metadata_load_prepare() and is still missing.

Port all plug-ins to use the new API, the suggested values are however
overridden by parasites and whatever special code was devised for the
individual plug-ins. This needs to be fixed.
2014-06-05 02:07:13 +02:00
Michael Natterer 425748dab0 libgimpbase, *: rename GimpFillType values: GIMP_FOO_FILL -> GIMP_FILL_FOO
Change all users accordingly and add compat enum values and compat
constants to script-fu and pygimp.
2014-06-03 01:11:32 +02:00
Michael Natterer f15b48b3c8 plug-ins, pdb: remove convolution-matrix and add a PDB compat procedure 2014-05-29 16:27:35 +02:00
Michael Natterer 3e6a7f4012 pdb, plug-ins: remove the rotate plug-in and add a PDB compat procedure 2014-05-24 22:46:11 +02:00
Michael Natterer 40030e084b plug-ins, pdb: remove the deinterlace plug-in and add a PDB compat proc 2014-05-20 21:30:42 +02:00
Michael Natterer 4712701415 app, plug-ins: move everything from Render->Clouds to the new Render->Noise
because that's what they are and what most menu labels in there says.
Keep the "Clouds" menu around for 3rd party plug-ins, not sure if it's
right to auto-map it to "Noise" automatically.
2014-05-18 22:46:05 +02:00
Michael Natterer 2ce79d3b13 plug-ins, pdb: remove the tile-glass plug-in and add a PDB compat procedure 2014-05-16 22:11:28 +02:00
Ed J b42cedd383 No tabs please, we're British. 2014-05-16 17:46:18 +01:00
Ed J a3be308aea file-gif-save2 takes 3 more params. 2014-05-16 17:37:06 +01:00
Michael Natterer 102a236265 plug-ins: some more stock-id -> icon-name porting 2014-05-12 00:37:42 +02:00
Michael Natterer 4bd5c185cc plug-ins: gtk_image_new_from_stock() -> from_icon_name() 2014-05-12 00:20:48 +02:00
Michael Natterer de08267f06 libgimpbase, *: add enum value GIMP_ICON_TYPE_ICON_NAME
and keep GIMP_ICON_TYPE_STOCK_ID as a deprecated alias. Change all
plug-ins accordingly and increase the pluginrc file version number so
it gets regenerated with "icon-name" instead of "stock-id".
2014-05-11 23:56:30 +02:00
Massimo Valentini 7e80e2e3bc Bug 707239 - Gimp destroys image file when exporting...
as .tif with jpeg compression

make unsensitive the JPEG radio button when the image
is indexed, similarly to Fax Group 3/4 compression
enabled only for monochrome images

move the file creation/truncation after checking for
invalid requests and return a GError in case of error
2014-05-07 18:10:26 +02:00
Michael Natterer 64290145a2 pdb. plug-ins: remove the noise-rgb plug-in and add PDB compat wrappers 2014-05-04 23:43:02 +02:00
Michael Natterer ff59aebbe8 pdb, plug-ins: remove the blur-gauss plug-in and add compat procedures
Add a utility function to wrap PDB compat nodes in gimp:cast-format
ops, so we can use ops that are now implemented in linear RGB for
plug-in compat procedures, which are all supposed to work on gamma
corrected RGB.
2014-05-04 22:53:29 +02:00
Michael Natterer d0c67f84c8 plug-ins: file-pdf-save needs two return values now for the error message 2014-05-01 20:27:10 +02:00
Piotr Drąg cdd78c9b16 Fix typo 2014-05-01 14:59:28 +02:00
Hartmut Kuhse f6328244a2 Bug 725577 - file-pdf-save fails to export images larger than 32768 pixels
Due to a restriction in libcairo, creating surfaces larger than 32768 pixels
fails, so saving a larger file in gimp  as PDF, is rejected.
2014-04-29 17:37:25 +02:00
Michael Natterer b883aec224 plug-ins: pass "RAW" to gimp_export_image() in file-raw-data.c
So the export logic GUI becomes debuggable.
2014-04-27 19:15:17 +02:00
Michael Natterer 740d83c70a plug-ins: fix the build in file-raw-data.c 2014-04-22 22:59:07 +02:00
Björn Kautler c3f2a5a116 Bug 728633 - Improvements to the file-raw plugin
Export the image before saving as raw image data.
2014-04-22 22:10:09 +02:00
Björn Kautler 3e96b96640 Bug 728633 - Improvements to the file-raw plugin
Register 'data' as save extension.
2014-04-22 22:02:29 +02:00
Michael Natterer 260a4a51b1 plug-ins, pdb: remove the lens-apply plug-in and add a compat procedure 2014-04-13 21:18:35 +02:00
Michael Natterer a5b92424b3 Bug 726761 - Alias PIX image encoding broken
save_image(): remove bogus "- 1" from the calculation of the height of
the row of tiles to save. Fixes garbage saved to the last line of all
PIX files.
2014-04-11 15:25:22 +02:00
Michael Natterer b9d587c7d2 Bug 726761 - Alias PIX image encoding broken
save_image(): use the chosen export format's bpp, not the drawable's.
Fixed exporting of > 8 bit images.

Also make the plug-in export indexed images directly (without
requiring export conversion).
2014-04-11 15:08:49 +02:00
Michael Natterer 614c61a3dd Don't #include <glib.h> before <lcms.h>
The include claimed to be because of "inline" in the lcms header, but
that was probably lcms1, since there is no trace of inline in the
lcms2 header.
2014-04-10 20:48:22 +02:00
Michael Natterer 661317f74c libgimpwidgets: make using GimpColorProfileComboBox easier
If the passed dialog is a GimpColorProfileChooserDialog, handle its
"response" signal automatically and also destroy it when the combo box
is destroyed (before we leaked all dialogs). Remove the same callback
from all places using GimpColorProfileComboBox.
2014-04-04 17:09:54 +02:00
Michael Natterer 3f826d02fa libgimpwidgets: make GimpColorProfileComboBox use lcms
and improve gimp_color_profile_combo_box_set_active() to get the
profile's label from the ICC file if no label was provided. Simplifies
all its callers and removes code duplication.
2014-04-02 13:03:52 +02:00
Michael Natterer 59f59726e3 plug-ins: simplify the lcms format fallback code
Instead of adding multiple #else ... #endif branches for missing lcms
types, do the fallback at the end if no lcms type could be determined
for the layer's pixel format.
2014-04-02 00:14:24 +02:00
Michael Natterer eb5bf3c2ba plug-ins: add fallbacks for all pixel formats not supported my lcms
- fall back to float for missing half float
- implement double and fallback to RGBA float for missing RGBA double
- fall back to float for everything else potentially missing
2014-03-31 17:40:15 +02:00
Michael Natterer d7037650df libgimpcolor: add gimp_lcms_profile_get_label()
which returns a string meant to label the profile in the GUI, it's
either the profile's description, its model, or "(unnamed profile)" as
a fallback. Use the function instead of duplicating that logic
inconsistently and imcompletely all over the place.
2014-03-30 03:12:42 +02:00
Michael Natterer 67391f6d9e plug-ins: don't create bogus combo entries in lcms_icc_combo_box_new()
- verify that GimpColorConfig.rgb_profile actually is an RGB profile.
- on failure, don't assoociate the rgb_profile filename with the
  built-in sRGB profile.
2014-03-30 01:34:34 +01:00
Michael Natterer 18c0ab0a19 plug-ins: remove undo_group parameter from lcms_image_set_profile()
and simply always push an undo group, there is no harm or overhead in
nested undo groups.
2014-03-29 14:54:41 +01:00
Michael Natterer 32e47cf70d libgimpcolor: add gimp_lcms_profile_is_equal()
and remove all of our own MD5 digest code and API. is_equal() uses
lcms' own MD5 API which I missed before. Thanks Elle for pointing that
out :)
2014-03-29 10:40:47 +01:00
Michael Natterer b3395d989e libgimpcolor: return an optional MD5 digest from gimp_lcms_create_srgb_profile()
pass NULL in most places, use the feature in the lcms.c plu-gin.
2014-03-23 23:34:47 +01:00