43 void *exif,
int exif_len, int32_t imgid,
int num,
int total, struct
dt_dev_pixelpipe_t *pipe,
44 const gboolean export_masks)
48 FILE *
f = g_fopen(filename,
"wb");
54 snprintf(header, 1024,
"PF\n%d %d\n-1.0", pfm->
width, pfm->
height);
55 size_t len = strlen(header);
58 while((len + 1 + off) & 0xf) off++;
59 while(off-- > 0) fprintf(
f,
"0");
62 for(
int j = 0; j < pfm->
height; j++)
65 const int row_in = pfm->
height - 1 - j;
66 const float *in = (
const float *)ivoid + 4 * (
size_t)pfm->
width * row_in;
67 float *
out = (
float *)buf_line;
68 for(
int i = 0;
i < pfm->
width;
i++, in += 4,
out += 3)
70 memcpy(
out, in,
sizeof(
float) * 3);
73 int cnt = fwrite(buf_line,
sizeof(
float) * 3, pfm->
width,
f);
120 return "image/x-portable-floatmap";
130 return _(
"PFM (float)");
static const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
dt_colorspaces_color_profile_type_t
const dt_aligned_pixel_t f
const dt_colormatrix_t dt_aligned_pixel_t out
#define dt_pixelpipe_cache_alloc_align_float_cache(pixels, id)
#define DT_MODULE(MODVER)
#define dt_pixelpipe_cache_free_align(mem)