Le 01/03/2013 22:05, johannes hanika a écrit :
> cool, seems to work fine.
>
> one question, what's with:
>
> -    roi_in->x += interpolation->width;
> -    roi_in->y += interpolation->width;
> -    roi_in->width -= 2*interpolation->width;
> -    roi_in->height -= 2*interpolation->width;
> +    //roi_in->x += interpolation->width;
> +    //roi_in->y += interpolation->width;
> +    //roi_in->width -= 2*interpolation->width;
> +    //roi_in->height -= 2*interpolation->width;
>       *roi_out = *roi_in;
>
>       // correct keystone correction factors by resolution of this buffer
> @@ -670,11 +751,11 @@ void modify_roi_in(struct dt_iop_module_t *self,
> struct dt_dev_pixelpipe_iop_t *
>     }
>
>     // adjust roi_in to minimally needed region
> -  const struct dt_interpolation* interpolation =
> dt_interpolation_new(DT_INTERPOLATION_USERPREF);
> -  roi_in->x      = aabb_in[0] - interpolation->width;
> -  roi_in->y      = aabb_in[1] - interpolation->width;
> -  roi_in->width  = aabb_in[2]-aabb_in[0]+2*interpolation->width;
> -  roi_in->height = aabb_in[3]-aabb_in[1]+2*interpolation->width;
> +  //const struct dt_interpolation* interpolation =
> dt_interpolation_new(DT_INTERPOLATION_USERPREF);
> +  roi_in->x      = aabb_in[0];// - interpolation->width;
> +  roi_in->y      = aabb_in[1];// - interpolation->width;
> +  roi_in->width  = aabb_in[2]-aabb_in[0];//+2*interpolation->width;
> +  roi_in->height = aabb_in[3]-aabb_in[1];//+2*interpolation->width;
>
> wasn't that what parafin fixed the other day? was it causing trouble?
Oh, parafin has fixed something here ? I will ask him to know what he did.
and yes, it was causing troubles because this"fixed" values, same for 
width and height, broke the crop ratio. Anyway, IIUC the interpolation 
code, this is not needed anymore, as interpolation code seems to handle 
correctly image borders.
>
> also that commented out code portion here:
>
> +    /*// parse config param:
>       if(g->current_aspect == -1.0f)
>       {
>         g->current_aspect =
> dt_conf_get_float("plugins/darkroom/clipping/custom_aspect");
> @@ -1261,7 +1363,7 @@ aspect_presets_changed (GtkWidget *combo,
> dt_iop_module_t *self)
>       // user is typing, don't overwrite it.
>       g->current_aspect = -2.0f;
>       // reset to free aspect ratio:
> -    dt_conf_set_int("plugins/darkroom/clipping/aspect_preset", -1);
> +    dt_conf_set_int("plugins/darkroom/clipping/aspect_preset", -1);*/
>
> can probably now be deleted (we still have it in git if we need it).
> that applies to a handful of lines of code more i guess.
oh you're right, taht can be deleted. I will do some cleanup asap.
>
> cheers,
>   jo
Aldric

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
darktable-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to