t30_set_status(s, T30_ERR_NORESSUPPORT);
break;
default:
- span_log(&s->logging, SPAN_LOG_WARNING, "Cannot negotiate an image format\n");
+ span_log(&s->logging, SPAN_LOG_WARNING, "Cannot negotiate an image mode\n");
t30_set_status(s, T30_ERR_BADTIFF);
break;
}
#include "spandsp/private/t85.h"
#include "spandsp/private/t42.h"
+/* The open_memstream() and fmemopen() in older versions of glibc seems quirky */
+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))
+#undef OPEN_MEMSTREAM
+#endif
+
#define T42_USE_LUTS
#include "t42_t43_local.h"
{
if (t42_itulab_jpeg_to_srgb(s))
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to convert from ITULAB.\n");
- s->end_of_data = 1;
+ s->end_of_data = true;
}
break;
default:
{
if (t42_itulab_jpeg_to_srgb(s))
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to convert from ITULAB.\n");
- s->end_of_data = 1;
+ s->end_of_data = true;
}
return T4_DECODE_OK;
}
set_lab_gamut(&s->lab, 0, 100, -85, 85, -75, 125, false);
}
- s->end_of_data = 0;
+ s->end_of_data = false;
s->compressed_image_size = 0;
s->error_message[0] = '\0';
s->metadata.image_type = T4_IMAGE_TYPE_BILEVEL;
}
/* Squashing to a bi-level image is possible */
- span_log(&s->logging, SPAN_LOG_FLOW, "The image will be flattened to %d\n", s->metadata.image_type);
+ span_log(&s->logging, SPAN_LOG_FLOW, "The image may be flattened to %d\n", s->metadata.image_type);
}
}
if (s->metadata.image_type != s->tiff.image_type || s->metadata.image_width != s->tiff.image_width)
{
- if (image_translate_init(&s->translator, s->metadata.image_type, s->metadata.image_width, -1, s->tiff.image_type, s->tiff.image_width, s->tiff.image_length, translate_row_read2, s) == NULL)
+ if (image_translate_init(&s->translator,
+ s->metadata.image_type,
+ s->metadata.image_width,
+ -1,
+ s->tiff.image_type,
+ s->tiff.image_width,
+ s->tiff.image_length,
+ translate_row_read2,
+ s) == NULL)
+ {
return T4_IMAGE_FORMAT_INCOMPATIBLE;
+ }
s->metadata.image_length = image_translate_get_output_length(&s->translator);
}