@@ -212,6 +212,14 @@ void modify_roi_out(dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, dt_iop
212212 const float scale = roi_in -> scale / piece -> iscale ;
213213 roi_out -> width -= (int )roundf ((float )x * scale );
214214 roi_out -> height -= (int )roundf ((float )y * scale );
215+
216+ if (piece -> pipe -> type & (DT_DEV_PIXELPIPE_FULL | DT_DEV_PIXELPIPE_EXPORT ))
217+ {
218+ if (piece -> pipe -> image .buf_dsc .frames > 1 )
219+ {
220+ roi_out -> frame_offset = roi_out -> width * roi_out -> height ;
221+ }
222+ }
215223}
216224
217225void modify_roi_in (dt_iop_module_t * self , dt_dev_pixelpipe_iop_t * piece , const dt_iop_roi_t * const roi_out ,
@@ -343,13 +351,13 @@ void process(struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const
343351{
344352 const dt_iop_rawprepare_data_t * const d = (dt_iop_rawprepare_data_t * )piece -> data ;
345353
346- // fprintf(stderr,"rawprepare %s\n", dt_pixelpipe_name(piece->pipe->type));
347- /* fprintf(stderr, "roi in %d %d %d %d\n", roi_in->x, roi_in->y, roi_in->width, roi_in->height);
354+ fprintf (stderr ,"rawprepare %s\n" , dt_pixelpipe_name (piece -> pipe -> type ));
355+ fprintf (stderr , "roi in %d %d %d %d\n" , roi_in -> x , roi_in -> y , roi_in -> width , roi_in -> height );
348356 fprintf (stderr , "roi out %d %d %d %d\n" , roi_out -> x , roi_out -> y , roi_out -> width , roi_out -> height );
349- fprintf(stderr,"frame size in: %d\n", roi_in->width * roi_in->height);
350- fprintf(stderr,"frame size iout: %d\n", roi_out->width * roi_out->height);
357+ /* fprintf(stderr,"frame size in: %d\n", roi_in->width * roi_in->height);
358+ fprintf(stderr,"frame size iout: %d\n", roi_out->width * roi_out->height);*/
351359 fprintf (stderr ,"i: %p\n" ,ivoid );
352- fprintf(stderr,"o: %p\n",ovoid);*/
360+ fprintf (stderr ,"o: %p\n" ,ovoid );
353361
354362 const int csx = compute_proper_crop (piece , roi_in , d -> x );
355363 const int csy = compute_proper_crop (piece , roi_in , d -> y );
0 commit comments