Am 29.01.2016 um 11:18 schrieb Pedro Côrte-Real:
Won't the names also be wrong if other modules are used? Things like rotating the image for example. I'm guessing the best complete way of doing this would be to use the backtransform() that's already in all the iops to figure out where currently a given point in the camera coordinate space is being displayed on the screen. That would make it future proof instead of special casing all the iops that can change orientation now and in the future. It may be tricky to choose a good point though as things like crops and warps can make the point move somewhat wildly. But maybe if it works 90% of the time it's already better and "a"/"b".
Great idea. I could define a vector (a) along the main diagonal defined by p0 = (0; 0) and p1 = (width, height). Then transform both points to the end of the pixelpipe and get corresponding vector (a)'. Then calculate the angle between both vectors. If fabs(angle) is below 45° or above 135° we regard the image as non-flipped (I don't need to care too much about image being mirrored or not). If image is above 45° and below 135° image is flipped.
Ulrich ___________________________________________________________________________ darktable developer mailing list to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org