[Rawstudio-dev] [PATCH] Fix crash when cropping
anders at brander.dk
Thu Jan 4 22:29:47 CET 2007
On Wed, 2007-01-03 at 21:39 +0200, Edouard Gomez wrote:
> Fix crash when cropping
> The width and height of the notroi preview image was miscalculated
> though their width and height were already available... use previous
> values and fix the crash eventually.
This fixes the crash-at-hand, but the problem is deeper than this.
The problem is related to calculating size of an image after transform.
We have to solve a few problems.
Calculate size in rs_image16_transform(), rs_image16_bilinear() and
rs_image16_transform_getwh(). If we transform an image (scale=1.0,
angle=0.0, crop=NULL) with the dimensions w * h we'll end up with an
image with the dimensions (w-1) * (h-1).
- calculating interpolation along edges.
- placing a pixel in real plane. Is x.0,y.0 at the corner or at the
center of a pixel?
- How should we round non-integer sizes?
More information about the Rawstudio-dev