diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Assemble.java | 15 | ||||
| -rwxr-xr-x | src/splashtool | 3 |
2 files changed, 16 insertions, 2 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); diff --git a/src/splashtool b/src/splashtool index d653f5d..9ab14c6 100755 --- a/src/splashtool +++ b/src/splashtool @@ -23,7 +23,6 @@ in="$(realpath "$1")" out="$(realpath "$2")" d="$(dirname "$(realpath "$0")")" - cd "$(dirname "$1")" -cat "$in" | "$d"/trim.py | "$d"/parse.py | java -cp "$d" Assemble "$out" +cat "$in" | "$d"/trim.py | "$d"/parse.py | java -cp "$d" Assemble "$out" "$3" |
