Preface
I learned a lot the last two days. So I was able to realise the aspect ratio calculator I hat in mind. Now I can easily check with which aspect ratio I am working at present.
Aspect Ratio Calculator
The aspect ratio calculator does nothing else than calculating the aspect ratio from the Width and Height given in the web UI.
AUTOMATIC1111 Like Look and Feel
After installation the Extension looks like all the other Extensions.
The -1 shows that there was no calculation yet. After acquiring width and height from the core web UI, one gets the calculated aspect ratio.
I used the case, that I want to create a banner for articles here at CIVITA. A resolution of 850 x 400 pixel results in a aspect ratio of 2.125:1.
To-Do
I need some final tests. Then the calculator is ready for publication. Before that I have also to write a documentation.
In one of the next versions I will realise that I get e.g. 2.125:1 as output. Than the interface works more clearly.
The new version is output the aspect ratio I was talking about in a form 2.125:1. This has to be tested a little bit more.
Spin-Off
Much more complicated will be the creation of a real life aspect ratio calculator where one can puts in width and height for calculation. This is the last building block I need for my work.
A common calculator is no longer a question. In parallel I prepared the first prototype. After understanding gradio better an better programming speeds up.
The question is, I have to think about, which feature I do need, and what features I have missed in the past.
Outlook
Here is a outlook on a calculator prototype.
One puts in arbitrary values and gets the related aspect ratio.
Two additional feature I have in mind. Calculate arbitrary resolutions based on a given aspect ratio. And calculate resolutions based on a given aspect ratio, where width and height are dividable by eight.
Final Words
Have a nice day. Have fun. Be inspired!