~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/jpeg/jpeg-icc.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* jpeg-icc.h
 
2
 *
 
3
 * This code was originally copied from the jpegicc tool as found in
 
4
 * the lcms source code. This code comes with the following copyright
 
5
 * notice:
 
6
 *
 
7
 * Little cms
 
8
 * Copyright (C) 1998-2004 Marti Maria
 
9
 *
 
10
 *  Permission is hereby granted, free of charge, to any person
 
11
 *  obtaining a copy of this software and associated documentation
 
12
 *  files (the "Software"), to deal in the Software without
 
13
 *  restriction, including without limitation the rights to use, copy,
 
14
 *  modify, merge, publish, distribute, sublicense, and/or sell copies
 
15
 *  of the Software, and to permit persons to whom the Software is
 
16
 *  furnished to do so, subject to the following conditions:
 
17
 *
 
18
 * The above copyright notice and this permission notice shall be
 
19
 *  included in all copies or substantial portions of the Software.
 
20
 */
 
21
 
 
22
void jpeg_icc_write_profile (j_compress_ptr  cinfo,
 
23
                             const guchar   *icc_data_ptr,
 
24
                             guint           icc_data_len);
 
25
 
 
26
 
 
27
/*
 
28
 * Reading a JPEG file that may contain an ICC profile requires two steps:
 
29
 *
 
30
 * 1. After jpeg_create_decompress() but before jpeg_read_header(),
 
31
 *    call jpeg_icc_setup_read_profile().  This routine tells the IJG
 
32
 *    library to save in memory any APP2 markers it may find in the
 
33
 *    file.
 
34
 *
 
35
 * 2. After jpeg_read_header(), call jpeg_icc_read_profile() to find
 
36
 *    out whether there was a profile and obtain it if so.
 
37
 */
 
38
 
 
39
 
 
40
/*
 
41
 * Prepare for reading an ICC profile
 
42
 */
 
43
 
 
44
void jpeg_icc_setup_read_profile (j_decompress_ptr cinfo);
 
45
 
 
46
 
 
47
/*
 
48
 * See if there was an ICC profile in the JPEG file being read;
 
49
 * if so, reassemble and return the profile data.
 
50
 *
 
51
 * TRUE is returned if an ICC profile was found, FALSE if not.
 
52
 * If TRUE is returned, *icc_data_ptr is set to point to the
 
53
 * returned data, and *icc_data_len is set to its length.
 
54
 *
 
55
 * IMPORTANT: the data at **icc_data_ptr has been allocated with malloc()
 
56
 * and must be freed by the caller with free() when the caller no longer
 
57
 * needs it.  (Alternatively, we could write this routine to use the
 
58
 * IJG library's memory allocator, so that the data would be freed implicitly
 
59
 * at jpeg_finish_decompress() time.  But it seems likely that many apps
 
60
 * will prefer to have the data stick around after decompression finishes.)
 
61
 */
 
62
 
 
63
gboolean jpeg_icc_read_profile (j_decompress_ptr   cinfo,
 
64
                                guchar           **icc_data_ptr,
 
65
                                guint             *icc_data_len);