Commit Graph

116 Commits

Author SHA1 Message Date
a33daf99fe libgimpcolor: rename RGB and GRAY gimp_color_profile_new_*() functions
to be more consistent, as discussed in bug #756389.
2015-12-15 20:42:21 +01:00
8c6fd714b5 plug-ins: always convert CMYK JPEGs to sRGB, not to the configured RGB 2015-08-20 11:41:05 +02:00
1d37c67879 plug-ins: use the GimpColorProfile API instead of the "icc-profile" parasite 2015-08-20 11:15:26 +02:00
c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
1615252ced plug-ins: get rid of GtkObject in jpeg-save.c
Reduces the diff in gtk3-port, and was wrong in some cases anyway.
2015-06-09 23:56:35 +02:00
3565b33019 libgimpconfig: rename the new GimpColorConfig profile accessor functions
gimp_color_config_get_foo_profile() -> get_foo_color_profile()

because the old names clash with possible future accessors for the raw
filename properties.
2015-06-03 09:57:34 +02:00
4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
6c800db1cc Use the newly added profile utility functions all over the place 2015-05-06 16:38:57 +02:00
cd68967b06 PLUGINS: Adds UI consistence to jpeg-save dialog. Fixes #747054 2015-03-31 18:19:55 -03:00
dbd350747e file-jpeg: Use slightly more accurate float DCT during load (Bug #741776) 2014-12-20 16:02:09 +05:30
d91cc01d84 file-jpeg: Fix typo in comment 2014-11-04 05:44:33 +05:30
ec462c16f0 file-jpeg: Add comment about inverted CYMK values 2014-11-04 05:43:44 +05:30
99789d252e file-jpeg: Initialize fields in case sscanf() assigns fewer of them 2014-10-28 09:54:20 +05:30
5c0cdb8ca8 file-jpeg: Improve description of file-jpeg-save args (#738443) 2014-10-20 10:23:00 +05:30
6c9181158e Bug 734655 - "Export Image As JPEG" settings are not remembered
Fix the number of expected fields when parsing the defaults parasite
so the saved settings are actually used. Spotted by Massimo.
2014-09-15 00:35:04 +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
08ffad9086 plug-ins: some gimp_spin_button_new() -> gtk_spin_button_new() 2014-06-22 00:26:59 +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
8ef1f20c22 file-jpeg: Reduce use of #ifdefs 2014-05-15 13:41:21 +05:30
c760829161 file-jpeg: Append to parasite fields 2014-05-15 01:38:58 +05:30
080fd93d90 file-jpeg: Use state of toggle button with the event 2014-05-15 01:37:16 +05:30
7a6b8f0e69 file-jpeg: Add support for arithmetic coding
Arithmetic coding is a feature of the JPEG standard. Although libjpeg
had always implemented arithmetic coding, it was compiled out by default
due to patents.

Those patents have now expired.

libjpeg 8 now enables arithmetic coding by default. Distributions which
use libjpeg < 8 can also support arithmetic coding by using the
appropriate CFLAGS to enable it. libjpeg-turbo 1.3.1 also has support
for arithmetic coding and is in popular shipping distributions.

Software such as jpegtran can losslessly convert Huffman compressed
images to arithmetic coding and vice versa. The lossy behavior of JPEG
does not happen at this (bit coding) layer of the format.

This initial patch provides a checkbox (disabled by default) to create
files which use arithmetic coding. It also has a tooltip warning that
such files may not be compatible with older decoders.
2014-05-15 00:57:42 +05:30
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
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
ebc53672cb libgimpcolor: add gimp_lcms_profile_is_rgb() and _is_cmyk()
And change all lcms code to use it.
2014-03-15 21:47:13 +01:00
05c5ca3216 Bug 723787 - Neutral sRGB profile matching Argyllcms sRGB.icm
Add gimp_lcms_create_srgb_profile() to libgimpcolor and use it where
we used to call cmsCreate_sRGBProfile().
2014-02-09 23:10:56 +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
a9376443d7 file-jpeg: fix operator precedence errors 2013-11-07 12:20:34 +01:00
8812abee0a plug-ins: save the metadata of the orig_image_ID in file-jpeg-save
The image_ID might be an export image and already deleted.
2013-11-05 08:49:40 +01:00
7bd4d2678a configure, plug-ins, modules: make lcms a hard dependency 2013-11-03 21:19:51 +01:00
49758867fc plug-ins: load the JPEG thumbnail using the new libgimp API 2013-10-30 00:06:05 +01:00
8db3b4312d Global EXIF -> Exif string change (official spelling) 2013-10-29 22:48:46 +01:00
7752873add plug-ins: trust the TIFF's resolution over its metadata's resolution
This also sortof addresses bug #691231, but fixes the issue only
indirectly by not perferring the EXIF resolution.
2013-10-27 18:52:46 +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
54ead10b57 plug-ins: simplify the file-jpeg file size displaying code
and display errors returned by g_file_query_info().
2013-10-12 18:53:03 +02:00
1f21a28770 Bug 703065 - Jpeg file size preview error is back
Use GIO to get the file size.
2013-10-05 00:14:14 +02: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
ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
bcc68763d6 file-jpeg: get data with alpha already stripped
otherwise the buffer allocated to locally ignore it
was smaller than necessary
2013-05-17 18:04:00 +02:00
a6c00399e8 file-jpeg: explicitely set babl_format when loading the image
when loading the image used for the preview,
it could be different from that of the layer
(u8 vs float for example)
2013-05-17 18:04:00 +02:00
0ae7894f87 file-jpeg: Fix load/save for different precisions 2013-05-14 13:35:47 +05:30
7fbec0ea17 plug-ins: link file-jpeg against GEGL_LIBS 2013-05-13 09:11:09 +02:00
c4dcc517a4 file-jpeg: GEGL convert save functions 2013-05-13 12:25:32 +05:30
3cb0b2f35e file-jpeg: unref GeglBuffer in case of a problem (contd.)
The duplicate code in load_image() and load_thumbnail_image() should be
merged at some point into a single function.
2013-05-13 11:50:03 +05:30
b6a2d45821 file-jpeg: unref GeglBuffer in case of a problem 2013-05-13 11:46:52 +05:30
51680fb987 file-jpeg: GEGL convert load functions
drawable_global doesn't seem to be used anywhere. This commit removes
it.
2013-05-13 11:42:10 +05:30
cc20c8d7f6 Fixed several typos. Minor whitespace changes. 2012-12-14 17:43:10 -05:00