summaryrefslogtreecommitdiff
path: root/backend/escl/escl_png.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2025-06-09 14:27:29 +0200
committerJörg Frings-Fürst <debian@jff.email>2025-06-09 14:27:29 +0200
commit652efae78c00b812033ea162d76cd13bd40dcab6 (patch)
tree7c139f4d2a28061607cd7e2269693df993e5d60a /backend/escl/escl_png.c
parentbfa2ae8e43fcbab696f272fffd164d0637e965c5 (diff)
New upstream version 1.4.0upstream/1.4.0upstream
Diffstat (limited to 'backend/escl/escl_png.c')
-rw-r--r--backend/escl/escl_png.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/backend/escl/escl_png.c b/backend/escl/escl_png.c
index 294ec00..fc8d02d 100644
--- a/backend/escl/escl_png.c
+++ b/backend/escl/escl_png.c
@@ -64,7 +64,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
// check for valid magic number
if (!png_check_sig (magic, sizeof (magic)))
{
- DBG( 1, "Escl Png : PNG error is not a valid PNG image!\n");
+ DBG( 10, "Escl Png : PNG error is not a valid PNG image!\n");
status = SANE_STATUS_INVAL;
goto close_file;
}
@@ -73,7 +73,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (!png_ptr)
{
- DBG( 1, "Escl Png : PNG error create a png read struct\n");
+ DBG( 10, "Escl Png : PNG error create a png read struct\n");
status = SANE_STATUS_INVAL;
goto close_file;
}
@@ -81,7 +81,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
png_infop info_ptr = png_create_info_struct (png_ptr);
if (!info_ptr)
{
- DBG( 1, "Escl Png : PNG error create a png info struct\n");
+ DBG( 10, "Escl Png : PNG error create a png info struct\n");
png_destroy_read_struct (&png_ptr, NULL, NULL);
status = SANE_STATUS_INVAL;
goto close_file;
@@ -93,7 +93,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
if (surface)
free (surface);
- DBG( 1, "Escl Png : PNG read error.\n");
+ DBG( 10, "Escl Png : PNG read error.\n");
status = SANE_STATUS_INVAL;
goto close_file;
}
@@ -115,7 +115,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
png_set_palette_to_rgb (png_ptr);
else if (color_type != PNG_COLOR_TYPE_RGB && color_type != PNG_COLOR_TYPE_RGB_ALPHA)
{
- DBG(1, "PNG format not supported.\n");
+ DBG(10, "PNG format not supported.\n");
status = SANE_STATUS_NO_MEM;
goto close_file;
}
@@ -145,7 +145,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
surface = (unsigned char *)malloc (sizeof (unsigned char) * w
* h * components);
if (!surface) {
- DBG( 1, "Escl Png : texels Memory allocation problem\n");
+ DBG( 10, "Escl Png : texels Memory allocation problem\n");
status = SANE_STATUS_NO_MEM;
goto close_file;
}
@@ -153,7 +153,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
// setup a pointer array. Each one points at the begening of a row.
row_pointers = (png_bytep *)malloc (sizeof (png_bytep) * h);
if (!row_pointers) {
- DBG( 1, "Escl Png : row_pointers Memory allocation problem\n");
+ DBG( 10, "Escl Png : row_pointers Memory allocation problem\n");
free(surface);
status = SANE_STATUS_NO_MEM;
goto close_file;
@@ -169,7 +169,7 @@ get_PNG_data(capabilities_t *scanner, int *width, int *height, int *bps)
// If necessary, trim the image.
surface = escl_crop_surface(scanner, surface, w, h, components, width, height);
if (!surface) {
- DBG( 1, "Escl Png : Surface Memory allocation problem\n");
+ DBG( 10, "Escl Png : Surface Memory allocation problem\n");
status = SANE_STATUS_NO_MEM;
goto close_file;
}