Browse Source

Recalculating crop

Former-commit-id: dacb429d4f754eba3edf4cc525b18da53e8032cd
pull/17/head
James South 12 years ago
parent
commit
e5fe904428
  1. 6
      src/ImageProcessor/Processors/Crop.cs

6
src/ImageProcessor/Processors/Crop.cs

@ -159,8 +159,10 @@ namespace ImageProcessor.Processors
// Work out the percentages.
float left = cropLayer.Left * sourceWidth;
float top = cropLayer.Top * sourceWidth;
float right = (sourceWidth - (cropLayer.Right * sourceWidth)) - left;
float bottom = (sourceHeight - (cropLayer.Bottom * sourceHeight)) - top;
float right = sourceWidth - (cropLayer.Right * sourceWidth);
float bottom = sourceHeight - (cropLayer.Bottom * sourceHeight);
//float right = (sourceWidth - (cropLayer.Right * sourceWidth)) - left;
//float bottom = (sourceHeight - (cropLayer.Bottom * sourceHeight)) - top;
rectangleF = new RectangleF(left, top, right, bottom);
}

Loading…
Cancel
Save