summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5d6997b)
I want to support fetching main view images scaled adaptively for the
window size. This involves having many more image sizes. I considered
abolishing the `%SIZE' list, but realized that this wouldn't work
because `Image::scale' needs to pass back a size name in its lazy-
thumbnailing query string.
Instead, just add lots of new sizes. The scale factor is about 3/2 in
each case. Making the factor more-or-less uniform involved changing a
couple of existing sizes: `bigthumb' shrunk a little from 228 to 216;
`view' used to be 1200, but is replaced by `medium', which is
significantly smaller at 1080. I know that `small' and `embed' are
already used externally, and have preserved these names and their
values (though the values already fit well into the sequence, so this
wasn't a hardship).
I'd have preferred to have more mall words and fewer big words in the
list, but I was constrained by the existing value of `small'. It seems
that there are just more words for being very big than being very small
anyway.
export qw{%SIZE};
our %SIZE = (smallthumb => 96,
medthumb => 144,
export qw{%SIZE};
our %SIZE = (smallthumb => 96,
medthumb => 144,
+ bigthumb => 216,
+ tiny => 320,
small => 480,
embed => 720,
small => 480,
embed => 720,
+ medium => 1080,
+ big => 1600,
+ large => 2400,
+ huge => 3600,
+ vast => 5400,
+ immense => 8100);
export qw{init};
my $initp = 0;
export qw{init};
my $initp = 0;
my $img = TrivGal::Image->new(join_paths $dir, $f->name);
for my $sz (@thumbsz) { $tn{$f->name}{$sz} = $img->scale($sz); }
if ($ff->[$i]->name eq "$base$ext")
my $img = TrivGal::Image->new(join_paths $dir, $f->name);
for my $sz (@thumbsz) { $tn{$f->name}{$sz} = $img->scale($sz); }
if ($ff->[$i]->name eq "$base$ext")
- { $fi = $i; $vw = $img->scale("view"); }
+ { $fi = $i; $vw = $img->scale("medium"); }
}
defined $fi or die "image not found in its folder?";
my $this = $ff->[$fi];
}
defined $fi or die "image not found in its folder?";
my $this = $ff->[$fi];