53 return C_(
"modulename",
"Final resampling");
84 if(roi_in->
scale > 1.f)
86 roi_in->
x = (int)roundf((
float)roi_in->
x / roi_out->
scale);
87 roi_in->
y = (int)roundf((
float)roi_in->
y / roi_out->
scale);
93 else if(scaling_pref == 0)
99 const float resample_scale = roi_out->
scale / roi_in->
scale;
100 roi_in->
x = (int)roundf(roi_in->
x / resample_scale);
101 roi_in->
y = (int)roundf(roi_in->
y / resample_scale);
108 const float *
const in,
float *
const out,
const dt_iop_roi_t *
const roi_in,
116 const void *
const ivoid,
void *
const ovoid)
141 const int devid = pipe->
devid;
145 if(err != CL_SUCCESS)
goto error;
205 self->
widget = gtk_label_new(NULL);
206 gtk_label_set_markup(GTK_LABEL(self->
widget),_(
"This module is used to downscale images at export time. "
207 "Moving it along the pipeline will have diffent effects on exported images. "
208 "<a href='https://ansel.photos/en/doc/modules/processing-modules/finalscale/'>Learn more</a>"));
209 gtk_widget_set_halign(self->
widget, GTK_ALIGN_START);
210 gtk_label_set_xalign (GTK_LABEL(self->
widget), 0.0f);
211 gtk_label_set_line_wrap(GTK_LABEL(self->
widget),
TRUE);
static void error(char *msg)
const dt_colormatrix_t dt_aligned_pixel_t out
int dt_conf_get_int(const char *name)
void dt_print(dt_debug_thread_t thread, const char *msg,...)
#define dt_free_align(ptr)
static void * dt_calloc_align(size_t size)
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
void distort_mask(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
int process(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
dt_iop_finalscale_gui_data_t dummy
void modify_roi_in(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_out, dt_iop_roi_t *roi_in)
dt_iop_finalscale_params_t dt_iop_finalscale_data_t
void gui_init(dt_iop_module_t *self)
void cleanup_pipe(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
int default_colorspace(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
void init(dt_iop_module_t *self)
void commit_params(dt_iop_module_t *self, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void init_pipe(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
int process_cl(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
void cleanup(dt_iop_module_t *self)
@ IOP_FLAGS_TILING_FULL_ROI
@ IOP_FLAGS_NO_HISTORY_STACK
#define IOP_GUI_ALLOC(module)
void dt_iop_clip_and_zoom_roi(float *out, const float *const in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride)
int dt_iop_clip_and_zoom_roi_cl(int devid, cl_mem dev_out, cl_mem dev_in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in)
const struct dt_interpolation * dt_interpolation_new(enum dt_interpolation_type type)
void dt_interpolation_resample_roi_1c(const struct dt_interpolation *itor, float *out, const dt_iop_roi_t *const roi_out, const float *const in, const dt_iop_roi_t *const roi_in)
@ DT_INTERPOLATION_USERPREF_WARP
@ DT_DEV_PIXELPIPE_THUMBNAIL
@ DT_DEV_PIXELPIPE_EXPORT
struct dt_iop_module_t *void * data
dt_dev_pixelpipe_type_t type
struct dt_develop_t * dev
struct dt_develop_t::@17 roi
int32_t hide_enable_button
dt_iop_params_t * default_params
dt_iop_gui_data_t * gui_data
Region of interest passed through the pixelpipe.