aboutsummaryrefslogtreecommitdiffstats
path: root/src/Assemble.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Assemble.java')
-rw-r--r--src/Assemble.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Assemble.java b/src/Assemble.java
index a1d9563..6a9a592 100644
--- a/src/Assemble.java
+++ b/src/Assemble.java
@@ -137,10 +137,25 @@ public class Assemble
g.drawImage(shadow, offx + 1, offy + 1, null);
g.drawImage(foreground, offx, offy, null);
g.dispose();
+
+ if (args[1].toLowerCase().startsWith("-w") || args[1].toLowerCase().startsWith("--w"))
+ splash = widescreen(splash);
+
ImageIO.write(splash, "png", new BufferedOutputStream(new FileOutputStream(new File(args[0]))));
}
+ private static BufferedImage widescreen(BufferedImage img)
+ {
+ BufferedImage rc = new BufferedImage(480 * 16 / 9, 480, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g = rc.createGraphics();
+ g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+ g.drawImage(img, 0, 0, 480 * 16 / 9, 480, 0, 0, 640, 480, null);
+ g.dispose();
+ return rc;
+ }
+
+
private static int join(int fg, int bg, int alpha)
{
double t = alpha * linear(fg) + (255 - alpha) * linear(bg);