params->pixels_per_line = mdata->width;
params->lines = mdata->height;
- kds_s2000w_image_converter_jpg_to_pnm(scanner_image, image, params->depth);
+ kds_s2000w_image_converter_jpg_to_pnm(scanner_image, image);
kds_s2000w_image_converter_tiff_to_pnm(scanner_image, image);
kds_s2000w_debug_printf_int(DEBUG, "size of pnm image", image->size);
void kds_s2000w_image_converter_metadata_from_scanner_image(blobdata* image, image_metadata* mdata);
-void kds_s2000w_image_converter_jpg_to_pnm(blobdata* in, blobdata* out, int depth);
+void kds_s2000w_image_converter_jpg_to_pnm(blobdata* in, blobdata* out);
void kds_s2000w_image_converter_tiff_to_pnm(blobdata* in, blobdata* out);
#endif
\ No newline at end of file
#include "kds_s2000w_image_type_check.h"
#include "kds_s2000w_debug.h"
-void _kds_s2000w_image_converter_to_pnm_depth(blobdata* in,
+void _kds_s2000w_image_converter_to_pnm(blobdata* in,
blobdata* out,
- int depth,
const char* format)
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_convert_to_pnm_With_depth");
image_info = CloneImageInfo(NULL);
sprintf(image_info->filename, "streamout.pnm");
- if (depth > -1)
-#if IMAGE_MAGICK_MAJOR == 6
- SetImageDepth(input_image, depth);
-#endif
-#if IMAGE_MAGICK_MAJOR == 7
- SetImageDepth(input_image, depth, exception);
-#endif
-
out->data = ImageToBlob(image_info, input_image, &out->size, exception);
DestroyImageInfo(image_info);
exception = NULL;
}
-void kds_s2000w_image_converter_jpg_to_pnm(blobdata* in, blobdata* out, int depth)
+void kds_s2000w_image_converter_jpg_to_pnm(blobdata* in, blobdata* out)
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_convert_jpg_to_pnm_With_depth");
if (!kds_s2000w_image_type_check_is_jpeg(in))
return;
- _kds_s2000w_image_converter_to_pnm_depth(in, out, depth, "jpg");
+ _kds_s2000w_image_converter_to_pnm(in, out, "jpg");
}
void kds_s2000w_image_converter_tiff_to_pnm(blobdata* in, blobdata* out)
if (!kds_s2000w_image_type_check_is_tiff(in))
return;
- _kds_s2000w_image_converter_to_pnm_depth(in, out, -1, "tiff");
+ _kds_s2000w_image_converter_to_pnm(in, out, "tiff");
}
\ No newline at end of file