Skip to content

Commit

Permalink
Update image.c
Browse files Browse the repository at this point in the history
  • Loading branch information
TitikshaBansal authored Mar 4, 2025
1 parent fe3632c commit 0a0358b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cupsfilters/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@


#include "image-private.h"


#include "config.h"


#ifdef HAVE_LIBJXL
#include <jxl/decode.h>
#include "image-jpeg-xl.h" /* Declarations for _cfImageReadJPEGXL() and is_jpegxl() */
#include "image-jpeg-xl.h" /* Declarations for _cfImageReadJPEGXL() and _cfIsJPEGXL() */
#endif


//
// Local functions...
//
Expand All @@ -53,6 +58,7 @@ static cf_ib_t *get_tile(cf_image_t *img, int x, int y);
static void trim_spaces(char *buf);
static unsigned char *find_bytes(FILE *fp, long int *size);


//
// 'cfImageClose()' - Close an image file.
//
Expand All @@ -76,6 +82,7 @@ cfImageClose(cf_image_t *img) // I - Image to close
unlink(img->cachename);
}


//
// Free the image cache...
//
Expand All @@ -90,6 +97,7 @@ cfImageClose(cf_image_t *img) // I - Image to close
free(current);
}


//
// Free the rest of memory...
//
Expand Down Expand Up @@ -253,6 +261,7 @@ cfImageGetRow(cf_image_t *img, // I - Image
count = CF_TILE_SIZE - (x & (CF_TILE_SIZE - 1));
if (count > width)
count = width;

memcpy(pixels, ib, count * bpp);
pixels += count * bpp;
x += count;
Expand Down Expand Up @@ -346,6 +355,7 @@ cfImageOpenFP(
DEBUG_printf(("cfImageOpen2(%p, %d, %d, %d, %d, %p)\n",
fp, primary, secondary, saturation, hue, lut));


//
// Figure out the file type...
//
Expand All @@ -365,6 +375,7 @@ cfImageOpenFP(
DEBUG_printf(("Error reading file!"));
fseek(fp, 0, SEEK_SET);


//
// Allocate memory...
//
Expand All @@ -377,6 +388,7 @@ cfImageOpenFP(
return (NULL);
}


//
// Load the image as appropriate...
//
Expand Down

0 comments on commit 0a0358b

Please sign in to comment.