Treat original images as untracked data, named with proper conversion
parameters for results similar to earlier gimp manipulation and exports.
Reuse the mkimgthumb script to crop and resize as appropriate:
tools/mkimgthumb --jpg '400x300>^ x200<' *
This will result in similar visual quality (at much smaller file sizes)
as gallery cells do not exceed 400px wide. Enlarge to at least 200px high
to elicit preview images on social media.
18 files changed:
'Typical IBM-derived APL keyboard layout,',
'as found in APLX and Dyalog implementations.',
],
'Typical IBM-derived APL keyboard layout,',
'as found in APLX and Dyalog implementations.',
],
- image => 'keyboard/altgr/unicomp-apl.jpg',
+ image => 'data/keyboard/thumb/unicomp-apl.jpg',
description => [
"An interactive map of EurKEY, the European Keyboard Layout.",
],
description => [
"An interactive map of EurKEY, the European Keyboard Layout.",
],
- image => 'keyboard/altgr/eurkeyboard.jpg',
+ image => 'data/keyboard/thumb/eurkeyboard.jpg',
"Apple ABC Extended keyboard layout table",
"with the Option modifier key.",
],
"Apple ABC Extended keyboard layout table",
"with the Option modifier key.",
],
- image => 'keyboard/altgr/macbook-gray.jpg',
+ image => 'data/keyboard/thumb/macbook-gray.jpg',
"Apple US International keyboard layout table",
"with the Option modifier key.",
],
"Apple US International keyboard layout table",
"with the Option modifier key.",
],
- image => 'keyboard/altgr/matias-fk302.jpg',
+ image => 'data/keyboard/thumb/matias-fk302.jpg',
"MSX keyboard layout table",
"with the code modifier key.",
],
"MSX keyboard layout table",
"with the code modifier key.",
],
- image => 'keyboard/altgr/msxcode.jpg',
+ image => 'data/keyboard/thumb/msxcode.jpg',
],
rows => [3, 0], # greek/front and top
moderows => '41-4',
],
rows => [3, 0], # greek/front and top
moderows => '41-4',
- image => 'keyboard/altgr/spacecadet.jpg',
+ image => 'data/keyboard/thumb/spacecadet.jpg',
"Google UK-Extended keyboard layout table for Chrome OS",
"with the AltGr modifier key.",
],
"Google UK-Extended keyboard layout table for Chrome OS",
"with the AltGr modifier key.",
],
- image => 'keyboard/altgr/chromebook-hp11.jpg',
+ image => 'data/keyboard/thumb/chromebook-hp11.jpg',
"Windows US international keyboard layout table",
"with the AltGr modifier key.",
],
"Windows US international keyboard layout table",
"with the AltGr modifier key.",
],
- image => 'keyboard/altgr/ku2971b-usint.jpg',
+ image => 'data/keyboard/thumb/ku2971b-usint.jpg',
push @ffs, my $ff = [$_];
my $r = $opt{$_};
push @{$ff}, -quality => $1 if $r =~ s/@(\d+)//;
push @ffs, my $ff = [$_];
my $r = $opt{$_};
push @{$ff}, -quality => $1 if $r =~ s/@(\d+)//;
- push @{$ff}, -resize => "$r^", -extent => $r;
+ push @{$ff}, -resize => !/\dx\d+$/ ? $_ : ("$_^", -extent => $_)
+ for split / /, $r;
+my $target = '..';
+$target = pop @ARGV if @ARGV >= 2 and -d $ARGV[-1];
+
my $failcount = 0;
for my $src (@ARGV) {
my $failcount = 0;
for my $src (@ARGV) {
for (@ffs) {
my ($ff, @ffcmds) = @{$_};
print " $ff";
for (@ffs) {
my ($ff, @ffcmds) = @{$_};
print " $ff";
- $image->convert("../$name.$ff", [@cmds, @ffcmds]);
+ $image->convert("$target/$name.$ff", [@cmds, @ffcmds]);