Commit Graph

79 Commits

Author SHA1 Message Date
1d37c67879 plug-ins: use the GimpColorProfile API instead of the "icc-profile" parasite 2015-08-20 11:15:26 +02:00
f72f8f20e5 Bug 751089: Part PNG files are not opened properly 2015-06-30 19:42:07 +02:00
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
b5530e9e3d Use the new GeglAccessMode enum instead of the old values 2014-07-02 02:00:35 +02:00
ac9101691c plug-ins: various small cleanups in the plug-ins that use metadata 2014-06-05 21:33:40 +02:00
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
4bd5c185cc plug-ins: gtk_image_new_from_stock() -> from_icon_name() 2014-05-12 00:20:48 +02:00
d296a2c08a plug-ins: Fix build with libpng versions < 1.4.
This was broken in 7c493f76f8.
2014-02-16 10:41:12 -05:00
7c493f76f8 Bug 721135 - Unable to export to .png - error: known incorrect sRGB profile
Some libpng errors can safely be marked as nonfatal, which is much
better than simply failing in those cases.

Thanks to John Bowler for pointing out this solution.
2014-02-15 22:55:18 -05:00
4a121c9872 plug-ins: save the metadata of the original image in file-png-save
not the one of the export duplicate.
2013-11-21 21:46:34 +01:00
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
658d950c6b plug-ins: trust the PNG's resolution over its metadata's resolution 2013-10-27 18:36:06 +01:00
a44e06d059 plug-ins: reverse the logic for setting GimpMetadataSaveFlags
start with flags = ALL (which now includes all possible current and
future flags), and optionally *remove* individual flags instead of
adding them. This way the plug-ins default to TRUE for future flags.
2013-10-27 15:38:42 +01:00
7cbe83d911 libgimp,plug-ins: split metadata loading into prepare() and finish()
So the plug-in has the chance to decide whether it wants to trust the
metadata information (e.g. resolution). Also reorder parameters in
gimp_image_metadata_save_finish(). Change all plug-ins accordingly.
2013-10-27 15:22:35 +01:00
21bed1e2fb Completely rewrite metadata handling using gexiv2
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:

- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
  include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
  including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
  changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
2013-10-27 01:02:17 +02:00
34c50b0fea app, plug-ins: Don't modify iter->length
The new by-row iteration doesn't re-write the length
value for each row. In general it is not safe to modify
the iterator data because the internal logic depends
on the public data, but this specific case is new.
2013-09-12 17:43:54 -07:00
d38f209e2f plug-ins - compress the PNG comment when over a given size. 2013-09-12 12:54:22 +12:00
d69b748692 Bug 707755 - reviewing PNG comment saving algorithm
Currently PNG "comment" is saved in iTXt (UTF-8) if supported, tEXt
(ISO-8859-1) otherwise. The problem is that some software out there like
ImageMagick would apparently only read tEXt comments.
Therefore the replacing algorithm is:
1/ if we would not lose any character in a conversion from UTF-8 to
ISO-8859-1, we save in tEXt, whether or not the platform supports iTXt.
2/ if we would lose comment data in the conversion while iTXt is
supported, we save in iTXt.
3/ if iTXt is not supported, we save in tEXt anyway and discard any
non-convertible character, unless the finale result is an empty string
(in which case, we don't save any comment).
2013-09-12 12:54:13 +12:00
caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
  GimpPrecision enum values is loaded correctly

This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
264d09b417 Rename colour and greyscale to color and grayscale respectively 2013-06-06 23:26:16 +02:00
2592f57df4 file-png: Fix some compiler warnings 2013-05-10 11:37:14 +05:30
bf7508bcd7 file-png: Use proper enum types instead of ints 2013-05-10 11:36:50 +05:30
14bb38da3f plug-ins: fix a memory leak in file-png
Found using clang's scan-build.
2013-01-14 17:36:43 -05:00
4d4905cc0e Revert "plug-ins: clean out compilation warning about types used by libpng."
This reverts commit a02facf41e.
It broke the build against other libpng versions.
2013-01-05 17:15:19 +01:00
a02facf41e plug-ins: clean out compilation warning about types used by libpng.
iCCP profile was changed from png_charpp to png_bytepp in 1.5.x (cf.
libpng manual). Older versions of libpng still works of course, but
we fix warnings for recent versions.
2013-01-04 20:40:26 +09:00
67dda14e77 plug-ins: cleanup in the recently GEGL-ported plug-ins
Mostly formatting consistency paranoia.
2012-11-27 20:58:05 +01:00
fe19ad9706 Bug 683694 - Spelling errors
Reworded all places that used to say "allows to".
2012-11-11 15:50:25 +01:00
d3e68fc995 plug-ins: don't crash loading a transparent indexed png
with no text chunk, in that case 'i' == tile_height and

*** glibc detected *** ...2.0/plug-ins/file-png:
  double free or corruption (out): 0x00000000011af590 ***
2012-07-09 18:04:08 +02:00
a13765e2a7 remove obsolete workaround for gegl 2012-05-03 01:16:21 +02:00
ab1bf6fcee clean up png plugin some more. 2012-05-02 17:51:22 +02:00
87abc72832 file-png: use gegl iterators for some of the code 2012-05-02 17:51:21 +02:00
7f45819202 ==== remove obsolete warning ==== 2012-05-02 17:51:21 +02:00
641848ea0b Fix the palette handling in gimp_drawable_get_format() 2012-05-02 17:51:21 +02:00
1549dd00ba file-png: implement PNG indexed saving/loading 2012-05-02 17:51:20 +02:00
89113fed51 code formatting fixes, some simplifications 2012-05-02 17:51:18 +02:00
64ad69e331 first shot at GEGL-based png-save 2012-05-02 17:51:18 +02:00
5edf1b1972 first shot at PNG loading with GEGL
Doesn't work yet for 16bit PNGs, there is a weird crash in libgimp
but I didn't do anything...

This closely follows the old pixel region based code, which might
be suboptimal for gegl, but has the advantage of keeping metadata intact.

Indexed currently is disabled, needs resurrecting.
2012-05-02 17:51:17 +02:00
257224ff99 Bug 674024: Store in .png does not compress
The slider did not always show the values effectively used
2012-04-14 18:39:49 +02:00
f07b9606d8 Bug 658610 - Warn when importing PNG images with an offse
Added a dialog about offsets to the PNG loader
2012-02-12 20:49:52 +01:00
e78ea68f69 file-png: Display a readable string when error message is unavailable 2011-12-06 20:48:09 +05:30
e410fe09e7 file-png: Mark string for translation 2011-12-06 20:47:37 +05:30
f40453be3c file-png: Remove redundant assignment 2011-10-11 10:22:24 +05:30
e0298effdf file-png: Move comment to correct function 2011-10-11 10:22:00 +05:30
5769acd3db file-png: Add comments about the struct checks 2011-09-27 19:22:50 +05:30
ff2b9ee727 file-png: Return correct type of error value 2011-09-21 17:16:54 +05:30
1ac6c7b85c file-png: Check that PNG structs are created properly
If there's a version mismatch between compiled version (header) and
installed shared libpng library, structs are not created and NULL is
returned.
2011-09-21 17:08:56 +05:30
5b999ab3f9 file-png: Indent some code 2011-05-06 19:33:46 +05:30
ae654a7aae file-png: Update comment for png_set_IHDR() 2011-05-05 20:47:53 +05:30
fbbeb8d629 file-png: Call png_set_*() functions after png_set_IHDR() 2011-05-05 20:36:45 +05:30
dbecc7b705 file-png: Move setting the comment text after IHDR is set 2011-05-05 20:15:02 +05:30