No need to perform an extra step when generating square thumbnails. If
both width and height are specified in vips.Options, and it’s the
same value, it just does the right thing.
Added square thumb resize test and benchmark. I tested the difference
between the new and old version; this is only about a 5% savings in
speed, which isn’t much, but it does simplify the code quite a bit.
No need to perform an extra step when generating square thumbnails. If both width and height are specified in
vips.Options
, and it’s the same value, it just does the right thing.See code here: https://github.com/DAddYE/vips/blob/master/vips.go#L124-L148
Added square thumb resize test and benchmark. I tested the difference between the new and old version; this is only about a 5% savings in speed, which isn’t much, but it does simplify the code quite a bit.