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.
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().
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.
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.
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
- 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.
plug-in-metadata-decode-exif makes use of the exif parasite
attached to the image few lines above.
and exif_data->size is the size of the thumbnail buffer that
starts at exif_data->data and not at exif_data.
==4677== Invalid read of size 1
==4677== at 0x4A0A130: memcpy@@GLIBC_2.14 (/builddir/build/BUILD/valgrind-3.7.0/memcheck/mc_replace_strmem.c:837)
==4677== by 0x4E440F8: gimp_write (gimp-2-8/libgimp/gimp.c:1726)
==4677== by 0x5BDD27E: gimp_wire_write (gimp-2-8/libgimpbase/gimpwire.c:174)
==4677== by 0x5BD9D41: _gp_params_write (gimp-2-8/libgimpbase/gimpprotocol.c:1748)
==4677== by 0x5BDDA46: gimp_wire_write_msg (gimp-2-8/libgimpbase/gimpwire.c:296)
==4677== by 0x5BDAE17: gp_proc_run_write (gimp-2-8/libgimpbase/gimpprotocol.c:305)
==4677== by 0x4E4513E: gimp_run_procedure2 (gimp-2-8/libgimp/gimp.c:993)
==4677== by 0x4E4544B: gimp_run_procedure (gimp-2-8/libgimp/gimp.c:926)
==4677== by 0x40BD36: gimp_metadata_store_exif (gimp-2-8/plug-ins/file-jpeg/gimpexif.c:69)
==4677== by 0x406EA4: load_image (gimp-2-8/plug-ins/file-jpeg/jpeg-load.c:343)
==4677== by 0x405A2E: run (gimp-2-8/plug-ins/file-jpeg/jpeg.c:235)
==4677== by 0x4E44AD8: gimp_main (gimp-2-8/libgimp/gimp.c:1992)
==4677== by 0x30A0421734: (below main) (in /usr/lib64/libc-2.15.so)
==4677== Address 0x8f75e01 is 1 bytes after a block of size 64 alloc'd
==4677== at 0x4A06F18: calloc (/builddir/build/BUILD/valgrind-3.7.0/coregrind/m_replacemalloc/vg_replace_malloc.c:566)
==4677== by 0x8AC304B: exif_data_new_mem (/home/massimo/libexif/libexif/exif-data.c:111)
==4677== by 0x8AC312D: exif_data_new (/home/massimo/libexif/libexif/exif-data.c:95)
==4677== by 0x407224: load_image (gimp-2-8/plug-ins/file-jpeg/jpeg-load.c:311)