Center tall, skinny thumbnails in their space.
This commit is contained in:
parent
6b80bc0717
commit
06467c38d8
1 changed files with 1 additions and 1 deletions
|
@ -540,7 +540,7 @@ int main(int argc, char* argv[]) {
|
||||||
sb += cut == std::string::npos ? name : name.substr(cut + 1);
|
sb += cut == std::string::npos ? name : name.substr(cut + 1);
|
||||||
size newSize = fit_within(maxThumbSize, size(original));
|
size newSize = fit_within(maxThumbSize, size(original));
|
||||||
original.resize(newSize.width, newSize.height, 1, -100, 5);
|
original.resize(newSize.width, newSize.height, 1, -100, 5);
|
||||||
image.draw_image(count * (tw + 8), (tw - newSize.height) / 2, 0, 0, original);
|
image.draw_image(count * (tw + 8) + (tw - newSize.width) / 2, (tw - newSize.height) / 2, 0, 0, original);
|
||||||
count++;
|
count++;
|
||||||
unsigned int sl = count * (cw + 2);
|
unsigned int sl = count * (cw + 2);
|
||||||
sb.resize(sl - 2, ' ');
|
sb.resize(sl - 2, ' ');
|
||||||
|
|
Loading…
Reference in a new issue