-
Bug
-
Resolution: Unresolved
-
P3
-
11, 17, 18
-
Cause Known
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Windows 10.0.19043.1348
A DESCRIPTION OF THE PROBLEM :
Running the attached code creates a long line in the produced image
REGRESSION : Last worked in version 8u311
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run code
open the result PNG image
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
very tiny black line
ACTUAL -
long black line
---------- BEGIN SOURCE ----------
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class PDFBOX_5322
{
public static void main(String[] args) throws IOException
{
BufferedImage bim = new BufferedImage(623, 311, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = (Graphics2D) bim.getGraphics();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setBackground(Color.white);
g2d.clearRect(0, 0, bim.getWidth(), bim.getHeight());
g2d.setColor(Color.black);
g2d.transform(new AffineTransform(1f, 0f, 0f, -1f, 0, 311f));
GeneralPath path = new GeneralPath();
path.moveTo(438.5315f, 261.2291f);
path.curveTo(437.8919f, 265.3086f, 437.6903f, 265.3338f, 437.6903f, 265.3338f);
path.curveTo(437.5043f, 265.3571f, 437.3822f, 265.2621f, 437.3822f, 265.2621f);
g2d.draw(path);
g2d.dispose();
ImageIO.write(bim, "png", new File("PDFBOX-5322.png"));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use jdk8, or don't use antialiasing
FREQUENCY : always
Windows 10.0.19043.1348
A DESCRIPTION OF THE PROBLEM :
Running the attached code creates a long line in the produced image
REGRESSION : Last worked in version 8u311
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run code
open the result PNG image
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
very tiny black line
ACTUAL -
long black line
---------- BEGIN SOURCE ----------
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class PDFBOX_5322
{
public static void main(String[] args) throws IOException
{
BufferedImage bim = new BufferedImage(623, 311, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = (Graphics2D) bim.getGraphics();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setBackground(Color.white);
g2d.clearRect(0, 0, bim.getWidth(), bim.getHeight());
g2d.setColor(Color.black);
g2d.transform(new AffineTransform(1f, 0f, 0f, -1f, 0, 311f));
GeneralPath path = new GeneralPath();
path.moveTo(438.5315f, 261.2291f);
path.curveTo(437.8919f, 265.3086f, 437.6903f, 265.3338f, 437.6903f, 265.3338f);
path.curveTo(437.5043f, 265.3571f, 437.3822f, 265.2621f, 437.3822f, 265.2621f);
g2d.draw(path);
g2d.dispose();
ImageIO.write(bim, "png", new File("PDFBOX-5322.png"));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use jdk8, or don't use antialiasing
FREQUENCY : always
- relates to
-
JDK-8341381 Random lines appear in graphic causing by the fix of JDK-8297230
- Open