{
return fread(data, sizeof(char), size, handler);
}
+
tsize_t _kds_s2000w_image_converter_tiff_write(thandle_t handler, tdata_t data, tsize_t size)
{
return fwrite(data, sizeof(char), size, handler);
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_write_pnm");
- if (format == BW) {
- _kds_s2000w_image_converter_write_bw_pnm(data,
- size,
- width,
- height,
- pnm_stream);
- return;
- }
-
xel** pixels = malloc(sizeof(xel*) * height);
for (int i = 0; i < height; i++) {
pixels[i] = malloc(sizeof(xel) * width);
char** outdata = malloc(sizeof(char*));
FILE* pnm_stream = open_memstream(outdata, &out->size);
- _kds_s2000w_image_converter_write_pnm(decompress_data,
+ _kds_s2000w_image_converter_write_bw_pnm(decompress_data,
decompress_size,
width,
height,
- BW,
pnm_stream);
fclose(pnm_stream);
pnm_stream = NULL;