fix: Change from INT_RGB to INT_ARGB when changing images to use 24-bit color depth
This commit is contained in:
parent
bcad1bfafd
commit
90aedfa2a6
|
@ -206,7 +206,7 @@ public class EditScreenshotPanel extends JPanel
|
|||
|
||||
private void updateLabelIcon()
|
||||
{
|
||||
BufferedImage copyOfImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_RGB);
|
||||
BufferedImage copyOfImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics g = copyOfImage.createGraphics();
|
||||
g.drawImage(image, 0, 0, null);
|
||||
g.setColor(Color.red);
|
||||
|
@ -258,7 +258,7 @@ public class EditScreenshotPanel extends JPanel
|
|||
BufferedImage newImage = image
|
||||
.getSubimage(x, y, width, height);
|
||||
BufferedImage copyOfImage =
|
||||
new BufferedImage(newImage.getWidth(), newImage.getHeight(), BufferedImage.TYPE_INT_RGB);
|
||||
new BufferedImage(newImage.getWidth(), newImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics g = copyOfImage.createGraphics();
|
||||
g.drawImage(newImage, 0, 0, null);
|
||||
return newImage;
|
||||
|
|
|
@ -91,7 +91,7 @@ public class FileManager
|
|||
{
|
||||
Image coverToSave = cover.getScaledInstance(122, 175, Image.SCALE_SMOOTH);
|
||||
BufferedImage copyOfImage =
|
||||
new BufferedImage(coverToSave.getWidth(null), coverToSave.getHeight(null), BufferedImage.TYPE_INT_RGB);
|
||||
new BufferedImage(coverToSave.getWidth(null), coverToSave.getHeight(null), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics g = copyOfImage.createGraphics();
|
||||
g.drawImage(coverToSave, 0, 0, null);
|
||||
g.dispose();
|
||||
|
@ -818,7 +818,7 @@ public class FileManager
|
|||
// Scale to right size.
|
||||
Image newImage = returnImage.getScaledInstance(320, 200, Image.SCALE_SMOOTH);
|
||||
BufferedImage copyOfImage =
|
||||
new BufferedImage(newImage.getWidth(null), newImage.getHeight(null), BufferedImage.TYPE_INT_RGB);
|
||||
new BufferedImage(newImage.getWidth(null), newImage.getHeight(null), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics g = copyOfImage.createGraphics();
|
||||
g.drawImage(newImage, 0, 0, null);
|
||||
return copyOfImage;
|
||||
|
@ -832,7 +832,7 @@ public class FileManager
|
|||
BufferedImage newImage = originalImage
|
||||
.getSubimage((originalImage.getWidth() - 320) / 2, ((originalImage.getHeight() - 200) / 2) - 1, 320, 200);
|
||||
BufferedImage copyOfImage =
|
||||
new BufferedImage(newImage.getWidth(), newImage.getHeight(), BufferedImage.TYPE_INT_RGB);
|
||||
new BufferedImage(newImage.getWidth(), newImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics g = copyOfImage.createGraphics();
|
||||
g.drawImage(newImage, 0, 0, null);
|
||||
return newImage;
|
||||
|
@ -844,7 +844,7 @@ public class FileManager
|
|||
BufferedImage newImage = originalImage
|
||||
.getSubimage((originalImage.getWidth() - 448) / 2, ((originalImage.getHeight() - 280) / 2) - 1, 448, 280);
|
||||
BufferedImage copyOfImage =
|
||||
new BufferedImage(newImage.getWidth(), newImage.getHeight(), BufferedImage.TYPE_INT_RGB);
|
||||
new BufferedImage(newImage.getWidth(), newImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics g = copyOfImage.createGraphics();
|
||||
g.drawImage(newImage, 0, 0, null);
|
||||
return newImage;
|
||||
|
|
Loading…
Reference in New Issue