code: public static void scaleImageUp(GrayU8 input , GrayU8 output , int scale ,
  									InterpolatePixelS<GrayU8> interp ) {
  		output.reshape(input.width*scale,input.height*scale);
  
  		float fdiv = 1/(float)scale;
  		interp.setImage(input);
  
  		for (int y = 0; y < output.height; y++) {
  			float inputY = y*fdiv;
  			int indexOutput = output.getIndex(0,y);
  
  			for (int x = 0; x < output.width; x++) {
  				float inputX = x*fdiv;
  
  				output.data[indexOutput++] = (byte)interp.get(inputX,inputY);
  			}
  		}
  	}
docs: Scales an image up using interpolation