unsigned int width, height, depth, n;
enum fz_colorspace_type type;
int interlace, indexed;
- unsigned int size;
+ size_t size;
unsigned char *samples;
unsigned char palette[256*4];
int transparency;
{
if (!info->interlace)
{
- info->size = info->height * (1 + (info->width * info->n * info->depth + 7) / 8);
+ info->size = info->height * (1 + ((size_t) info->width * info->n * info->depth + 7) / 8);
}
else
{
{
fz_pixmap *image = NULL;
struct info png;
- int stride;
+ size_t stride;
int alpha;
fz_var(image);
{
png_read_image(ctx, &png, p, total, 0);
- stride = (png.width * png.n * png.depth + 7) / 8;
+ stride = ((size_t) png.width * png.n * png.depth + 7) / 8;
alpha = (png.n == 2 || png.n == 4 || png.transparency);
if (png.indexed)