Scales an image up using interpolation

@param scale How much larger the output image will be.
171060
public static <T extends ImageGray<T>>
	void scaleImageUp(T input , T output , int scale, InterpolatePixelS<T> interp ) {
		if( scale <= 1 )
			throw new IllegalArgumentException("Scale must be >= 2");
		if( input instanceof GrayF32) {
			ImplPyramidOps.scaleImageUp((GrayF32)input,(GrayF32)output,scale,(InterpolatePixelS)interp);
		} else if( input instanceof GrayU8) {
			ImplPyramidOps.scaleImageUp((GrayU8)input,(GrayU8)output,scale,(InterpolatePixelS)interp);
		} else {
			throw new IllegalArgumentException("Image type not yet supported");
		}
	}
773781
@Api
	public void setScales(Double... scales) {
		// Sort decreasing and store the list:
		Arrays.sort(scales, Collections.reverseOrder());
		scaleList = Arrays.asList(scales);
		// Apply the requested scales on the SelectItem. Make sure only available scales are added:
		updateScaleList();
	}
220342
public Img scale(float scale) {
		if (scale < 0) {
			// 自动修正负数
			scale = -scale;
		}

		final BufferedImage srcImg = getValidSrcImg();
		int width = NumberUtil.mul(Integer.toString(srcImg.getWidth()), Float.toString(scale)).intValue(); // 得到源图宽
		int height = NumberUtil.mul(Integer.toString(srcImg.getHeight()), Float.toString(scale)).intValue(); // 得到源图长
		return scale(width, height);
	}
473638
public static BufferedImage scaleImage( BufferedImage image, int newSize ) throws Exception {

        int imageWidth = image.getWidth();
        int imageHeight = image.getHeight();
        int width;
        int height;
        if (imageWidth > imageHeight) {
            width = newSize;
            height = imageHeight * width / imageWidth;
        } else {
            height = newSize;
            width = height * imageWidth / imageHeight;
        }

        BufferedImage resizedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = resizedImage.createGraphics();
        g.drawImage(image, 0, 0, width, height, null);
        g.dispose();

        return resizedImage;
    }
117578
def resetScale(self):
        """"""
        self.img.scale(1./self.imgScale[0], 1./self.imgScale[1])
        self.imgScale = (1.,1.)
263730
public static void scaleIntrinsic(CameraPinhole param , double scale ) {
		param.width = (int)(param.width*scale);
		param.height = (int)(param.height*scale);
		param.cx *= scale;
		param.cy *= scale;
		param.fx *= scale;
		param.fy *= scale;
		param.skew *= scale;
	}
176373
public void setValue(Vector3f scale) {
        mX = scale.x;
        mY = scale.y;
        mZ = scale.z;
    }
275958
def scale(self, image, geometry, options):
        
        upscale = options['upscale']
        x_image, y_image = map(float, self.get_image_size(image))
        factor = self._calculate_scaling_factor(x_image, y_image, geometry, options)

        if factor < 1 or upscale:
            width = toint(x_image * factor)
            height = toint(y_image * factor)
            image = self._scale(image, width, height)

        return image
717349
public static void scale(InputStream srcStream, OutputStream destStream, float scale) {
		scale(read(srcStream), destStream, scale);
	}
1350816
public static Sprite scale(Sprite original, float scale, ScalingMethod method) {
		if (scale == 1.0f) return original.copy();

		switch (method) {
			case NEAREST:
				return scaleNearest(original, scale);
			case BILINEAR:
				return scaleBilinear(original, scale);
		}

		return null;
	}
432724
public void scale(double s, Vector3d v1) {
        x = s * v1.x;
        y = s * v1.y;
        z = s * v1.z;
    }
479428
public static void scale(Image srcImg, ImageOutputStream destImageStream, float scale) throws IORuntimeException {
		writeJpg(scale(srcImg, scale), destImageStream);
	}
259755
public void setImageRepaint(BufferedImage image) {
		// if image is larger before  than the new image then you need to make sure you repaint
		// the entire image otherwise a ghost will be left
		ScaleOffset workspace;
		if( SwingUtilities.isEventDispatchThread() ) {
			workspace = adjustmentGUI;
		} else {
			workspace = new ScaleOffset();
		}
		repaintJustImage(img,workspace);
		this.img = image;
		if( image != null ) {
			repaintJustImage(img, workspace);
		} else {
			repaint();
		}
	}
627944
def scale(self, dx=1.0, dy=1.0):
        '''
        

        '''
        self.width *= dx
        self.height *= dy
588687
public static IIOImage getScaledInstance(IIOImage iioSource, float scale) {
        if (!(iioSource.getRenderedImage() instanceof BufferedImage)) {
            throw new IllegalArgumentException("RenderedImage in IIOImage must be BufferedImage");
        }

        if (Math.abs(scale - 1.0) < 0.001) {
            return iioSource;
        }

        BufferedImage source = (BufferedImage) iioSource.getRenderedImage();
        BufferedImage target = getScaledInstance(source, (int) (scale * source.getWidth()), (int) (scale * source.getHeight()));
        return new IIOImage(target, null, null);
    }
1044429
private static void scaleUpFiveDestructive(Slice decimal, int fiveScale)
    {
        while (fiveScale > 0) {
            int powerFive = Math.min(fiveScale, MAX_POWER_OF_FIVE_INT);
            fiveScale -= powerFive;
            int multiplier = POWERS_OF_FIVES_INT[powerFive];
            multiplyDestructive(decimal, multiplier);
        }
    }
1271364
def __execute_scale(self, surface, size_to_scale_from):
        """"""
        x = size_to_scale_from[0] * self.__scale[0]
        y = size_to_scale_from[1] * self.__scale[1]
        scaled_value = (int(x), int(y))

##        #Find out what scaling technique we should use.
##        if self.image.get_bitsize >= 24:
##            #We have sufficient bit depth to run smooth scale
##            self.image = pygame.transform.smoothscale(self.image, scaled_value)
##        else:
            ##Surface doesn't support smooth scale, revert to regular scale
        self.image = pygame.transform.scale(self.image, scaled_value)

        self.__resize_surface_extents()