Commit graph

30 commits

Author SHA1 Message Date
Michael Natterer
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
luz.paz
147c09f19e Bug 795161 - Misc. typo fixes in source comments and doxygen
Found via `codespell`
Follow-up to  commit 7fdb963e01
2018-04-18 21:06:57 +02:00
Jehan
e0c36f3e1b plug-ins: auto-detect HGT variants.
Since SRTM-1 and SRTM-3 data have a fixed image size, it is actually
very easy to auto-detect these by checking the file size. There is no
need to ask the user to select between the 2 variants (even though these
values are made quite obvious by official download links).
I still left the dropdown appear optionally if the detection fails for
some reason (we never know, at least that makes a fallback, for instance
to be able to load partial data!). Yet now by default, HGT file settings
should be fully auto-detected.
2017-12-10 22:50:36 +01:00
Jehan
43f7a43700 plug-ins: update file-hgt-load description...
... and minor space and indentation fix.
2017-12-10 21:37:24 +01:00
Jehan
7fce78b2ce plug-ins: properly set returned error in pdb call.
g_set_error() so that when samplespacing is not a valid argument for
file-hgt-load, the error is properly propagated.
Also add a g_warning() to get the error in the terminal as well.
2017-12-10 05:35:36 +01:00
Jehan
35597db931 plug-ins: register a separate load handler file-hgt-load for HGT files.
This allows for it to show as a separate item in the open dialog, with
proper naming. Also add proper arguments so that the handler works as a
PDB function in non-interactive mode, unlike file-raw-load which works
only interactively.
2017-12-10 05:35:04 +01:00
Jehan
733b2344b3 plug-ins: leave a message for translators.
"Digital Elevation Model" (DEM) is a technical term which therefore
cannot be translated just by its meaning.
2017-12-09 23:12:01 +01:00
Jehan
b78b14b17e plug-ins: let's special-case just a bit the HGT data.
- Display title "Digital Elevation Model data" instead of just "Image".
- Don't show the type combo anymore, since HGT is always 16-bit signed
  integer in big endian.
- Don't show the width and height either, but instead show a dropdown
  list to choose between either SRTM-1 or SRTM-3 data. There seems to be
  only these 2 types of data, and this will determine the width and
  height. This choice (SRTM-1 vs 3) will mostly likely be better known
  by people than knowing what image dimension they have to set,
  especially since official links for such files seem to all include the
  information.
2017-12-09 23:01:46 +01:00
Jehan
88ccdb4e2f plug-ins: minor cleaning and fixes.
- Add some parentheses to sizeof (*pointer). Maybe it's just me, but it
  is just a bit clearer to me.
- Free in_raw when out_raw allocation failed.
- Use strrchr() instead of strchr() to get the extension (I had a case
  when testing where the file was inside a folder named similarly with a
  ".hgt" and it would break the comparison test).
- Do a case-insensitive comparison. Even though the original files from
  NASA use lowercase, just to be sure.
2017-12-09 22:20:43 +01:00
Massimo Valentini
c572bdf6d6 Bug 771661: Extend the raw data import plugin to open .hgt files
add support to load single channel 16 bit, signed/unsigned,
little/big endian 2d raster data as a 16 bit RGB gamma GIMP image
2017-12-09 20:48:29 +01: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
b1506229f9 plug-ins: change save procedures of the file-raw-data plug-in
The signature of the original file-raw-save procedure must not change,
so change it to use the old parameters.

Change the other procedure (with additional arguments) to
file-raw-save2.
2017-07-31 20:17:51 +02:00
Massimo Valentini
f2306abc0a Bug 761170: Warnings building with clang
Fix some of the warnings.
2017-07-15 21:05:56 +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
801bd8fb3f plug-ins: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +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 Schumacher
b6e7d19e4f Merge branch 'master' into bug-728633 2016-12-26 20:01:06 +01:00
Michael Natterer
4033415a79 app, libgimpwidgets, plug-ins: kill gtk_scrolled_window_add_with_viewport()
It's deprecated in GTK+ 3.x, so we get rid of some deprecation
warnings. Also, it has always only been a utility function that hides
what is really going on in the widget hierarchy.
2016-09-07 20:12:28 +02:00
Björn Kautler
1ca556972e Bug 728633 - Improvements to the file-raw plugin.
Allow non-interactive and last-vals call of raw image data export.
2016-06-13 23:31:36 +02:00
Björn Kautler
827f72bba5 Bug 728633 - Improvements to the file-raw plugin.
Save and restore last selected values and provide settable default selections for the raw image data export dialog.
2016-06-13 23:07:50 +02:00
Björn Kautler
2395e99a1b Bug 728633 - Improvements to the file-raw plugin.
Use GtkBuilder for raw image data export dialog.
2016-06-13 23:06:31 +02:00
Michael Natterer
26ff8eb40d Bug 761573 - Problem with Raw Image Loader plugin
Use g_file_query_info() to get the file's size, stat() has some
windows 64 bit problem I've forgotten.
2016-02-12 00:36:11 +01:00
Michael Natterer
e1baaa0677 Bug 742821 - Grayscale-mode image malformed when exported as planar raw image data
Fix saving of planar data by taking the actual number of components of
the drawable into account, instead of always assuming 3 (RGB).
2015-03-04 22:32:07 +01: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
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
14ab0da020 plug-ins: rename file-raw to file-raw-data
to remove confusion with raw digital camera files.
2013-09-01 20:02:56 +02:00
Renamed from plug-ins/common/file-raw.c (Browse further)