Skip to content

Commit

Permalink
change histogram C type from long to UINT32
Browse files Browse the repository at this point in the history
  • Loading branch information
Yay295 committed Sep 19, 2024
1 parent de0f457 commit e5948bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libImaging/Histo.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ImagingHistogramNew(Imaging im) {
h->mode[IMAGING_MODE_LENGTH - 1] = 0;

h->bands = im->bands;
h->histogram = calloc(im->pixelsize, 256 * sizeof(long));
h->histogram = calloc(im->pixelsize, 256 * sizeof(*(h->histogram)));
if (!h->histogram) {
free(h);
return (ImagingHistogram)ImagingError_MemoryError();
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/Imaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct ImagingHistogramInstance {
int bands; /* Number of bands (1, 3, or 4) */

/* Data */
long *histogram; /* Histogram (bands*256 longs) */
UINT32 *histogram; /* Histogram (bands*256 UINT32) */
};

struct ImagingPaletteInstance {
Expand Down

0 comments on commit e5948bb

Please sign in to comment.