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

« back to all changes in this revision

Viewing changes to app/core/gimpimage-colorhash.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include "gimpimage.h"
26
26
#include "gimpimage-colorhash.h"
 
27
#include "gimpimage-colormap.h"
27
28
 
28
29
 
29
30
#define MAXDIFF         195076
113
114
                                      gint             g,
114
115
                                      gint             b)
115
116
{
116
 
  guchar *cmap;
117
 
  gint    num_cols;
118
 
  guint   pixel;
119
 
  gint    hash_index;
120
 
  gint    cmap_index;
 
117
  const guchar *cmap;
 
118
  gint          num_cols;
 
119
  guint         pixel;
 
120
  gint          hash_index;
 
121
  gint          cmap_index;
121
122
 
122
 
  cmap       = image->cmap;
123
 
  num_cols   = image->num_cols;
 
123
  cmap       = gimp_image_get_colormap (image);
 
124
  num_cols   = gimp_image_get_colormap_size (image);
124
125
  pixel      = (r << 16) | (g << 8) | b;
125
126
  hash_index = pixel % HASH_TABLE_SIZE;
126
127