~ubuntu-branches/debian/squeeze/python-imaging/squeeze

« back to all changes in this revision

Viewing changes to libImaging/GetBBox.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-11-20 19:22:59 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20091120192259-n3iy0f17n5akogom
Tags: 1.1.7-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
2
 * The Python Imaging Library
3
 
 * $Id: GetBBox.c 2298 2005-02-17 21:17:29Z fredrik $
 
3
 * $Id$
4
4
 *
5
5
 * helpers to bounding boxes, min/max values, number of colors, etc.
6
6
 *
113
113
    FLOAT32 fmin, fmax;
114
114
 
115
115
    if (im->bands != 1) {
116
 
        ImagingError_ModeError();
 
116
        (void) ImagingError_ModeError();
117
117
        return -1; /* mismatch */
118
118
    }
119
119
 
181
181
      }
182
182
      /* FALL THROUGH */
183
183
    default:
184
 
        ImagingError_ModeError();
 
184
        (void) ImagingError_ModeError();
185
185
        return -1;
186
186
    }
187
187
    return 1; /* ok */
239
239
    /* printf("code_size=%d\n", code_size); */
240
240
    /* printf("code_poly=%d\n", code_poly); */
241
241
 
242
 
    if (!code_size) {
243
 
        ImagingError_MemoryError(); /* just give up */
244
 
        return NULL;
245
 
    }
 
242
    if (!code_size)
 
243
        return ImagingError_MemoryError(); /* just give up */
246
244
 
247
 
    if (!im->image32) {
248
 
        ImagingError_ModeError();
249
 
        return NULL;
250
 
    }
 
245
    if (!im->image32)
 
246
        return ImagingError_ModeError();
251
247
 
252
248
    table = calloc(code_size + 1, sizeof(ImagingColorItem));
253
 
    if (!table) {
254
 
        ImagingError_MemoryError();
255
 
        return NULL;
256
 
    }
 
249
    if (!table)
 
250
        return ImagingError_MemoryError();
257
251
 
258
252
    pixel_mask = 0xffffffff;
259
253
    if (im->bands == 3)