test_class.declarator: BLACK_HALF_TRANSPARENT = new Color(0, 0, 0, 128)
test_class.modifier: private static final
test_class.original_string: private static final Color BLACK_HALF_TRANSPARENT = new Color(0, 0, 0, 128);
test_class.type: Color
test_class.var_name: BLACK_HALF_TRANSPARENT
test_class.declarator: BLACK_TRANSPARENT = new Color(0, true)
test_class.modifier: private static final
test_class.original_string: private static final Color BLACK_TRANSPARENT = new Color(0, true);
test_class.type: Color
test_class.var_name: BLACK_TRANSPARENT
test_class.declarator: CORNER_SIZE = 2
test_class.modifier: private static final
test_class.original_string: private static final int CORNER_SIZE = 2;
test_class.type: int
test_class.var_name: CORNER_SIZE
test_class.declarator: CENTERED_SIZE = 3
test_class.modifier: private static final
test_class.original_string: private static final int CENTERED_SIZE = 3;
test_class.type: int
test_class.var_name: CENTERED_SIZE
test_class.declarator: BLACK_PIXEL_TOP_LEFT
test_class.modifier: private static final
test_class.original_string: private static final BufferedImage BLACK_PIXEL_TOP_LEFT;
test_class.type: BufferedImage
test_class.var_name: BLACK_PIXEL_TOP_LEFT
test_class.declarator: BLACK_PIXEL_TOP_RIGHT
test_class.modifier: private static final
test_class.original_string: private static final BufferedImage BLACK_PIXEL_TOP_RIGHT;
test_class.type: BufferedImage
test_class.var_name: BLACK_PIXEL_TOP_RIGHT
test_class.declarator: BLACK_PIXEL_BOTTOM_LEFT
test_class.modifier: private static final
test_class.original_string: private static final BufferedImage BLACK_PIXEL_BOTTOM_LEFT;
test_class.type: BufferedImage
test_class.var_name: BLACK_PIXEL_BOTTOM_LEFT
test_class.declarator: BLACK_PIXEL_BOTTOM_RIGHT
test_class.modifier: private static final
test_class.original_string: private static final BufferedImage BLACK_PIXEL_BOTTOM_RIGHT;
test_class.type: BufferedImage
test_class.var_name: BLACK_PIXEL_BOTTOM_RIGHT
test_class.file: runelite-client/src/test/java/net/runelite/client/util/ImageUtilTest.java
test_class.identifier: ImageUtilTest
test_case.body: @Test
  	public void rotateImage()
  	{
  		// TODO: Test more than 90° rotations
  
  		// Evenly-sized images (2x2)
  		assertTrue(bufferedImagesEqual(BLACK_PIXEL_TOP_RIGHT, ImageUtil.rotateImage(BLACK_PIXEL_TOP_LEFT, Math.PI / 2)));
  		assertTrue(bufferedImagesEqual(BLACK_PIXEL_BOTTOM_RIGHT, ImageUtil.rotateImage(BLACK_PIXEL_TOP_LEFT, Math.PI)));
  		assertTrue(bufferedImagesEqual(BLACK_PIXEL_BOTTOM_LEFT, ImageUtil.rotateImage(BLACK_PIXEL_TOP_LEFT, Math.PI * 3 / 2)));
  		assertTrue(bufferedImagesEqual(BLACK_PIXEL_TOP_LEFT, ImageUtil.rotateImage(BLACK_PIXEL_TOP_LEFT, Math.PI * 2)));
  
  		// Unevenly-sized images (2x1); when rotated 90° become (2x2) images
  		final BufferedImage twoByOneLeft = new BufferedImage(2, 1, BufferedImage.TYPE_INT_ARGB);
  		twoByOneLeft.setRGB(0, 0, BLACK.getRGB());
  		final BufferedImage twoByTwoRight = new BufferedImage(2, 1, BufferedImage.TYPE_INT_ARGB);
  		twoByTwoRight.setRGB(1, 0, BLACK.getRGB());
  		final BufferedImage oneByTwoTop = new BufferedImage(2, 2, BufferedImage.TYPE_INT_ARGB);
  		oneByTwoTop.setRGB(1, 0, new Color(0, 0, 0, 127).getRGB());
  		final BufferedImage oneByTwoBottom = new BufferedImage(2, 2, BufferedImage.TYPE_INT_ARGB);
  		oneByTwoBottom.setRGB(0, 0, new Color(0, 0, 0, 127).getRGB());
  		oneByTwoBottom.setRGB(0, 1, BLACK.getRGB());
  
  		assertTrue(bufferedImagesEqual(oneByTwoTop, ImageUtil.rotateImage(twoByOneLeft, Math.PI / 2)));
  		assertTrue(bufferedImagesEqual(twoByTwoRight, ImageUtil.rotateImage(twoByOneLeft, Math.PI)));
  		assertTrue(bufferedImagesEqual(oneByTwoBottom, ImageUtil.rotateImage(twoByOneLeft, Math.PI * 3 / 2)));
  		assertTrue(bufferedImagesEqual(twoByOneLeft, ImageUtil.rotateImage(twoByOneLeft, Math.PI * 2)));
  	}
test_case.class_method_signature: ImageUtilTest.rotateImage()
test_case.full_signature: @Test public void rotateImage()
test_case.identifier: rotateImage
test_case.invocations: assertTrue bufferedImagesEqual rotateImage assertTrue bufferedImagesEqual rotateImage assertTrue bufferedImagesEqual rotateImage assertTrue bufferedImagesEqual rotateImage setRGB getRGB setRGB getRGB setRGB getRGB setRGB getRGB setRGB getRGB assertTrue bufferedImagesEqual rotateImage assertTrue bufferedImagesEqual rotateImage assertTrue bufferedImagesEqual rotateImage assertTrue bufferedImagesEqual rotateImage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void rotateImage()
focal_class.file: runelite-client/src/main/java/net/runelite/client/util/ImageUtil.java
focal_class.identifier: ImageUtil
focal_class.class_method_signature: ImageUtil.bufferedImageFromImage(final Image image)
focal_class.full_signature: public static BufferedImage bufferedImageFromImage(final Image image)
focal_class.identifier: bufferedImageFromImage
focal_class.modifiers: public static
focal_class.parameters: (final Image image)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage bufferedImageFromImage(final Image image)
focal_class.class_method_signature: ImageUtil.toARGB(final Image image)
focal_class.full_signature: public static BufferedImage toARGB(final Image image)
focal_class.identifier: toARGB
focal_class.modifiers: public static
focal_class.parameters: (final Image image)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage toARGB(final Image image)
focal_class.class_method_signature: ImageUtil.luminanceOffset(final Image rawImg, final int offset)
focal_class.full_signature: public static BufferedImage luminanceOffset(final Image rawImg, final int offset)
focal_class.identifier: luminanceOffset
focal_class.modifiers: public static
focal_class.parameters: (final Image rawImg, final int offset)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage luminanceOffset(final Image rawImg, final int offset)
focal_class.class_method_signature: ImageUtil.luminanceScale(final Image rawImg, final float percentage)
focal_class.full_signature: public static BufferedImage luminanceScale(final Image rawImg, final float percentage)
focal_class.identifier: luminanceScale
focal_class.modifiers: public static
focal_class.parameters: (final Image rawImg, final float percentage)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage luminanceScale(final Image rawImg, final float percentage)
focal_class.class_method_signature: ImageUtil.alphaOffset(final Image rawImg, final int offset)
focal_class.full_signature: public static BufferedImage alphaOffset(final Image rawImg, final int offset)
focal_class.identifier: alphaOffset
focal_class.modifiers: public static
focal_class.parameters: (final Image rawImg, final int offset)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage alphaOffset(final Image rawImg, final int offset)
focal_class.class_method_signature: ImageUtil.alphaOffset(final Image rawImg, final float percentage)
focal_class.full_signature: public static BufferedImage alphaOffset(final Image rawImg, final float percentage)
focal_class.identifier: alphaOffset
focal_class.modifiers: public static
focal_class.parameters: (final Image rawImg, final float percentage)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage alphaOffset(final Image rawImg, final float percentage)
focal_class.class_method_signature: ImageUtil.grayscaleImage(final BufferedImage image)
focal_class.full_signature: public static BufferedImage grayscaleImage(final BufferedImage image)
focal_class.identifier: grayscaleImage
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage grayscaleImage(final BufferedImage image)
focal_class.class_method_signature: ImageUtil.resizeImage(final BufferedImage image, final int newWidth, final int newHeight)
focal_class.full_signature: public static BufferedImage resizeImage(final BufferedImage image, final int newWidth, final int newHeight)
focal_class.identifier: resizeImage
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image, final int newWidth, final int newHeight)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage resizeImage(final BufferedImage image, final int newWidth, final int newHeight)
focal_class.class_method_signature: ImageUtil.resizeCanvas(final BufferedImage image, final int newWidth, final int newHeight)
focal_class.full_signature: public static BufferedImage resizeCanvas(final BufferedImage image, final int newWidth, final int newHeight)
focal_class.identifier: resizeCanvas
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image, final int newWidth, final int newHeight)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage resizeCanvas(final BufferedImage image, final int newWidth, final int newHeight)
focal_class.class_method_signature: ImageUtil.rotateImage(final BufferedImage image, final double theta)
focal_class.full_signature: public static BufferedImage rotateImage(final BufferedImage image, final double theta)
focal_class.identifier: rotateImage
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image, final double theta)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage rotateImage(final BufferedImage image, final double theta)
focal_class.class_method_signature: ImageUtil.flipImage(final BufferedImage image, final boolean horizontal, final boolean vertical)
focal_class.full_signature: public static BufferedImage flipImage(final BufferedImage image, final boolean horizontal, final boolean vertical)
focal_class.identifier: flipImage
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image, final boolean horizontal, final boolean vertical)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage flipImage(final BufferedImage image, final boolean horizontal, final boolean vertical)
focal_class.class_method_signature: ImageUtil.outlineImage(final BufferedImage image, final Color color)
focal_class.full_signature: public static BufferedImage outlineImage(final BufferedImage image, final Color color)
focal_class.identifier: outlineImage
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image, final Color color)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage outlineImage(final BufferedImage image, final Color color)
focal_class.class_method_signature: ImageUtil.outlineImage(final BufferedImage image, final Color color, final Boolean outlineCorners)
focal_class.full_signature: public static BufferedImage outlineImage(final BufferedImage image, final Color color, final Boolean outlineCorners)
focal_class.identifier: outlineImage
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image, final Color color, final Boolean outlineCorners)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage outlineImage(final BufferedImage image, final Color color, final Boolean outlineCorners)
focal_class.class_method_signature: ImageUtil.getResourceStreamFromClass(final Class c, final String path)
focal_class.full_signature: public static BufferedImage getResourceStreamFromClass(final Class c, final String path)
focal_class.identifier: getResourceStreamFromClass
focal_class.modifiers: public static
focal_class.parameters: (final Class c, final String path)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage getResourceStreamFromClass(final Class c, final String path)
focal_class.class_method_signature: ImageUtil.fillImage(final BufferedImage image, final Color color)
focal_class.full_signature: public static BufferedImage fillImage(final BufferedImage image, final Color color)
focal_class.identifier: fillImage
focal_class.modifiers: public static
focal_class.parameters: (final BufferedImage image, final Color color)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage fillImage(final BufferedImage image, final Color color)
focal_class.class_method_signature: ImageUtil.offset(final BufferedImage image, final float[] scales, final float[] offsets)
focal_class.full_signature: private static BufferedImage offset(final BufferedImage image, final float[] scales, final float[] offsets)
focal_class.identifier: offset
focal_class.modifiers: private static
focal_class.parameters: (final BufferedImage image, final float[] scales, final float[] offsets)
focal_class.return: BufferedImage
focal_class.signature: BufferedImage offset(final BufferedImage image, final float[] scales, final float[] offsets)
focal_class.class_method_signature: ImageUtil.getImageSpritePixels(BufferedImage image, Client client)
focal_class.full_signature: public static SpritePixels getImageSpritePixels(BufferedImage image, Client client)
focal_class.identifier: getImageSpritePixels
focal_class.modifiers: public static
focal_class.parameters: (BufferedImage image, Client client)
focal_class.return: SpritePixels
focal_class.signature: SpritePixels getImageSpritePixels(BufferedImage image, Client client)
focal_class.class_method_signature: ImageUtil.getImageIndexedSprite(BufferedImage image, Client client)
focal_class.full_signature: public static IndexedSprite getImageIndexedSprite(BufferedImage image, Client client)
focal_class.identifier: getImageIndexedSprite
focal_class.modifiers: public static
focal_class.parameters: (BufferedImage image, Client client)
focal_class.return: IndexedSprite
focal_class.signature: IndexedSprite getImageIndexedSprite(BufferedImage image, Client client)
focal_method.body: public static BufferedImage rotateImage(final BufferedImage image, final double theta)
  	{
  		AffineTransform transform = new AffineTransform();
  		transform.rotate(theta, image.getWidth() / 2.0, image.getHeight() / 2.0);
  		AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
  		return transformOp.filter(image, null);
  	}
focal_method.class_method_signature: ImageUtil.rotateImage(final BufferedImage image, final double theta)
focal_method.full_signature: public static BufferedImage rotateImage(final BufferedImage image, final double theta)
focal_method.identifier: rotateImage
focal_method.invocations: rotate getWidth getHeight filter
focal_method.modifiers: public static
focal_method.parameters: (final BufferedImage image, final double theta)
focal_method.return: BufferedImage
focal_method.signature: BufferedImage rotateImage(final BufferedImage image, final double theta)