Closed paw-lu closed 3 years ago
Follow up:
Tried different resolution
values for the same x
and y
values in size
, and get different sizes and aspect ratios.
Why is this the case?
The code would try to keep the aspect ratio of the source image, no matter what "size" was passed. (but, when using any resolution other than "square" the aspect ratio of the terminal is 1:2, so all images would look-like broken). I just updated that code to respect the given size, and keep the aspect-ratio if one of the size components is set to "None".
(that is branch 'main' right now, and should be the behavior on 0.4.2 and later releases)
but, when using any resolution other than "square" the aspect ratio of the terminal is 1:2, so all images would look-like broken
Got it. Thanks for the explanation!
I just updated that code to respect the given size, and keep the aspect-ratio if one of the size components is set to "None".
Thanks! It's appreciated. I look forward to trying it out!
Just integrated the changes and wanted to say thanks for helping me out!
Trying to use this library to convert images to block characters. So far it's working great.
One point of confusion for me is how to control the size of the output. For context, I'm trying to preserve the ratio of the image, but constrain either its height or width so that it can fit within an arbitrary space.
Here I attempt—and fail—to read in an image and constrain its output to 30 characters in width.
It renders perfectly, but is wider than 30 characters.
I'm trying to understand:
size
argument actually do? The resulting image is not 30x30.(Again) thanks for the project!