About 8,230 results
Open links in new tab
  1. Scale images as a single surface in Java 2D API

    Sep 27, 2014 · Try the SCALE_AREA_AVERAGING and the SCALE_SMOOTH for nicer scaled images. // Scaled 3 times: Image img2 = img.getScaledInstance(img.getWidth(null)*3, …

  2. Java Graphics2D Translate and Scale - Stack Overflow

    Jun 11, 2015 · Here's the code I have so far to do it: AffineTransform t = new AffineTransform(); float a = 400 - player.getX(); float b = 250 - player.getY(); t.translate(a, b); /* * Here's where I …

  3. java - How do you use re-size all Graphic2D - Stack Overflow

    Dec 12, 2014 · For this you can use the Graphics2D.scale(double,double), Graphics2D.rotate(double), Graphics2D.translate(double,double) and …

  4. How Can I Resize an Image Using Java? - Baeldung

    Mar 26, 2025 · Core Java offers the following options for resizing images: Graphics2D is the fundamental class for rendering 2-dimensional shapes, text, and images on the Java platform. …

  5. Transforming Shapes, Text, and Images (The Java™ Tutorials > 2D ...

    You can modify the transform attribute in the Graphics2D context to move, rotate, scale, and shear graphics primitives when they are rendered. The transform attribute is defined by an …

  6. How to Properly Scale a BufferedImage in Java - CodingTechRoom

    Scaling a BufferedImage in Java requires a method to preserve the quality and content of the image. The Graphics2D class provides ways to draw and manipulate images but simply …

  7. 3 Ways to Resize Images in Java - Cloudinary

    Apr 11, 2025 · Java provides several techniques for programmatic bulk image resize, including the getScaledInstance () method and the Graphics2D class. We’ll also show how to use …

  8. Graphics2D (Java Platform SE 8 ) - Oracle

    This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout. This is the …

  9. Scale image in Java and preserve its quality

    Jun 8, 2020 · From the core Java features, there are two main ways to scale image - using Graphics2D and Image.getScaledInstance(). They provide us with certain configuration …

  10. java - Scale an image with Graphics2D - Stack Overflow

    May 4, 2013 · I have a image of a crate that I want to be draw bigger than I have drawn it. Then I want the image to become progressively smaller with times so that it looks like it's dropped …

Refresh