Пример #1
0
        public void rotate(int degrees)
        {
            RenderedOp newImage = ImageUtilities.getRotatedImage(
                image, degrees);

            replaceImage(newImage);
        }
Пример #2
0
        public void rotate(int degrees)
        {
            RenderedOp newImage = ImageUtilities.getRotatedImage(
                image, degrees);

            image.Dispose();
            System.GC.Collect();
            image = newImage;
        }
Пример #3
0
        public void scaleToOneDimension(float desiredDimension, float imageDimension)
        {
            if (Math.Abs(desiredDimension - imageDimension) < errorThreshold)
            {
                return;
            }
            float scalingFactor = desiredDimension / imageDimension;

            scalingFactor = (float)(Math.Floor(scalingFactor * 100) * 0.01f);
            RenderedOp newImage = ImageUtilities.getScaledImage(
                image, scalingFactor, scalingFactor);

            replaceImage(newImage);
        }
Пример #4
0
        public void scaleToOneDimension(float desiredDimension, float imageDimension)
        {
            if (Math.Abs(desiredDimension - imageDimension) < errorThreshold)
            {
                return;
            }
            float scalingFactor = desiredDimension / imageDimension;

            scalingFactor = (float)(Math.Floor(scalingFactor * 100) * 0.01f);
            RenderedOp newImage = ImageUtilities.getScaledImage(
                image, scalingFactor, scalingFactor);

            image.Dispose();
            System.GC.Collect();
            image = newImage;
        }
 internal static RenderedOp getRotatedImage(RenderedOp image, int degrees)
 {
     throw new NotImplementedException();
 }
Пример #6
0
 private void replaceImage(RenderedOp newImage)
 {
     image.Dispose();
     System.GC.Collect();
     image = newImage;
 }