You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this applies to any image less than 8 pixel tall or 4 pixels wide. Ideally, something should be rendered for these tiny images.
I'm imaging two options:
My initial thought was to rescale the image so it's at least 4x8. This commit does exactly that. It's the only commit on the branch fix-tiny.
However, I'm now thinking of a different approach: If the image is smaller than target window in both directions, scale up to fill the space, but limit the scale to the the largest integer that won't cause the image to exceed the allotted space. Also use nearest neightbor interpolation. The result should provide larger "pixels". On the down side, this approach won't work for images that are very narrow but tall or very wide but short. That may yet require special case logic.
The text was updated successfully, but these errors were encountered:
I think the general algorithm should be as follows:
Scale down as necessary to meet the w/h constraints (I think this should work already, but I think that somebody pointed out that determining the terminal size might not work when redirecting the output?)
Expand (=pad) to the nearest 4x8 size
The main problem with 2 might be that we might not know the best background color... perhaps just use the bottom right corner pixel color? Or just black or white?
Given the attached files, I'd expect some sort of output, but tiv reports nothing.
5x5
4x4
3x3
2x2
1x1
I believe this applies to any image less than 8 pixel tall or 4 pixels wide. Ideally, something should be rendered for these tiny images.
I'm imaging two options:
My initial thought was to rescale the image so it's at least 4x8. This commit does exactly that. It's the only commit on the branch fix-tiny.
However, I'm now thinking of a different approach: If the image is smaller than target window in both directions, scale up to fill the space, but limit the scale to the the largest integer that won't cause the image to exceed the allotted space. Also use nearest neightbor interpolation. The result should provide larger "pixels". On the down side, this approach won't work for images that are very narrow but tall or very wide but short. That may yet require special case logic.
The text was updated successfully, but these errors were encountered: