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

« back to all changes in this revision

Viewing changes to app/core/gimpimage-convert-fsdither.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
 
/* The GIMP -- an image manipulation program
 
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
22
22
/* The following 5 arrays are used in performing floyd-steinberg
23
23
 *  error diffusion dithering. The range array allows the quick
24
24
 *  bounds checking of pixel values. The 4 error arrays contain
25
 
 *  the error computations for the east, south-east, south and 
 
25
 *  the error computations for the east, south-east, south and
26
26
 *  south-west pixels surrounding the current pixel respectively.
27
27
 */
28
28
 
29
29
 
30
 
static const short range_array[] = {
 
30
static const guchar range_array[] = {
31
31
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
32
32
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
33
33
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
133
133
  255,  255,  255,  255,  255,
134
134
};
135
135
 
136
 
static const short floyd_steinberg_error1[] = {
 
136
static const gshort floyd_steinberg_error1[] = {
137
137
 -223, -223, -222, -222, -221, -221, -220, -220, -220, -219,
138
138
 -219, -218, -218, -217, -217, -217, -216, -216, -215, -215,
139
139
 -214, -214, -213, -213, -213, -212, -212, -211, -211, -210,
239
239
  222,  223,  223,  224,  224,
240
240
};
241
241
 
242
 
static const short floyd_steinberg_error2[] = {
 
242
static const gshort floyd_steinberg_error2[] = {
243
243
  -95,  -95,  -95,  -95,  -95,  -94,  -94,  -94,  -94,  -94,
244
244
  -93,  -93,  -93,  -93,  -93,  -93,  -92,  -92,  -92,  -92,
245
245
  -92,  -91,  -91,  -91,  -91,  -91,  -90,  -90,  -90,  -90,
345
345
   95,   95,   95,   96,   96,
346
346
};
347
347
 
348
 
static const short floyd_steinberg_error3[] = {
 
348
static const gshort floyd_steinberg_error3[] = {
349
349
 -159, -159, -159, -158, -158, -158, -157, -157, -157, -156,
350
350
 -156, -156, -155, -155, -155, -155, -154, -154, -154, -153,
351
351
 -153, -153, -152, -152, -152, -151, -151, -151, -150, -150,
451
451
  159,  159,  159,  160,  160,
452
452
};
453
453
 
454
 
static const short floyd_steinberg_error4[] = {
 
454
static const gshort floyd_steinberg_error4[] = {
455
455
  -34,  -33,  -33,  -33,  -33,  -33,  -34,  -33,  -32,  -33,
456
456
  -33,  -33,  -33,  -33,  -32,  -31,  -33,  -32,  -32,  -32,
457
457
  -32,  -32,  -33,  -32,  -31,  -32,  -32,  -32,  -32,  -32,