aspect-ratio Questions

3

I'm desperately trying to change the aspect ratio of an image to 16:9 without stretching it. .aspectRatio(16/9, contentMode: .fill or .fit) isn't usable because it's pure garbage (no one on Earth w...
Ambsace asked 20/4, 2023 at 16:25

5

Solved

I am relatively new to programming. I need to calculate the aspect ratio(16:9 or 4:3) from a given dimension say axb. How can I achieve this using C#. Any help would be deeply appreciated. public ...
Leaving asked 9/4, 2012 at 7:34

7

Solved

I have a RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_grav...
Cormick asked 17/10, 2013 at 14:41

6

Solved

I've got a div element that maintains an aspect ratio: it calculates its height based on its width (using the padding trick). What I'd like to do is to put this div into another one by fitting the ...
Constellate asked 10/5, 2018 at 21:49

2

I have a card of sorts. On the right side of it is variable width/height content, and the left side is an image. I'd like the image to stretch vertically, taking up all of the vertical space in the...
Sassy asked 26/12, 2021 at 6:48

2

Solved

This seems like it ought to be easy, but I'm just not getting something. I want to make an HTML page containing a single SVG image that automatically scales to fit the browser window, without any ...
Futch asked 13/4, 2011 at 0:47

8

Solved

I'm trying to make a square plot (using imshow), i.e. aspect ratio of 1:1, but I can't. None of these work: import matplotlib.pyplot as plt ax = fig.add_subplot(111,aspect='equal') ax = fig.add_s...
Debbi asked 1/11, 2011 at 11:27

34

Solved

I want to create a responsive div that can change its width/height as the window's width changes. Are there any CSS rules that would allow the height to change according to the width, while maintai...
Diu asked 29/9, 2009 at 23:11

5

Solved

It is possible to fit and center a square div in the viewport and always maintain it's aspect ratio according to width and height? Requirements : only CSS the size of the square must adapt to th...
Norm asked 13/5, 2014 at 11:34

4

Solved

I have been trying to do something that seemed easy, but I have been trying for a few hours and I can't find the solution. I have an SVG that needs to be on top of a screen. It came from the desig...
Mckellar asked 7/5, 2020 at 12:28

11

Solved

When I set up an equal aspect ratio for a 3d graph, the z-axis does not change to 'equal'. So this: fig = pylab.figure() mesFig = fig.gca(projection='3d', adjustable='box') mesFig.axis('equal') mes...
Ezechiel asked 3/12, 2012 at 14:33

7

Solved

I need to maintain the width of an element as a percentage of its height. So as the height changes, the width is updated. The opposite is achievable by using a % value for padding-top, but padding...
Usherette asked 18/10, 2014 at 9:47

3

Here's a barebones example: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() f = fig.add_subplot(2, 1, 1, projection='3d') t = fig.add_subplot(2, 1, 2, p...
Instal asked 8/8, 2015 at 1:48

6

Solved

I can't believe I can't find the formula for this. I am using a PHP script called SLIR to resize images. The script asks to specify an aspect ratio for cropping. I'd like to get the aspect ratio ba...
Carmelocarmen asked 7/11, 2011 at 23:16

4

Solved

How to ensure that each cell of table should become square without using fixed sizes? And be responsive when they change width. table { width: 90%; } td { width: 30%; } tr { /** what...
Sisterhood asked 3/4, 2014 at 10:56

8

I have a user resizable WPF Window that I want to constrain the resizing so the aspect ratio of the window stays constant. Ideally I would like to constrain mouse location when the window is bein...
Illsorted asked 18/3, 2010 at 17:8

3

I am trying to plot a collection of points onto a graphic of King County, WA. I can show the graphic with the following code: fig, ax = plt.subplots(figsize = (15,15)) kings_county.plot(ax=ax) Thi...
Counterpoint asked 25/7, 2020 at 15:43

15

Solved

I've been working on making my custom camera activity on Android, but when rotating the camera, the aspect ratio of the surface view gets messed up. In my oncreate for the activity, I set the fram...

5

Solved

I am playing video from URL on Exoplayer, it stretching the video on resizing/on using resize_mode as I have mentioned in layout file using this I am not able to maintain the aspect ratio of video....
Contract asked 26/2, 2018 at 12:1

4

I have a problem with showing a landscape image without centerCrop. I tried PercentFramelayout, and set aspect ratio programmatically like this: laParams.percentLayoutInfo.aspectRatio = img.widt...
Dore asked 3/11, 2017 at 8:58

7

all. How to change resolution of the video with aspect ratio with FFmpeg? There are options http://manpages.ubuntu.com/manpages/oneiric/man1/ffmpeg.1.html -s size Set frame size. The format i...
Electro asked 6/6, 2014 at 17:9

1

Solved

I have trouble clipping the image in SwiftUI Here is the code with minimal wrong-working example: struct TestView: View { var body: some View { Image("iPhone13Pro") .resizable() ...
Archer asked 8/8, 2022 at 9:37

13

I have a VideoView which is set up like this: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/player" android:orientation="vertical" android:lay...
Seiler asked 28/11, 2012 at 11:3

9

Solved

I have N squares. I have a Rectangular box. I want all the squares to fit in the box. I want the squares to be as large as possible. How do I calculate the largest size for the squares such that t...
Indetermination asked 15/10, 2009 at 22:59

4

Solved

I'd like to get a 1000 x 1000 picture in Python from any input picture so that the input doesn't lose it's aspect ratio. In other words, I want to resize the input so that its longer dimension is 1...
Miasma asked 23/6, 2017 at 11:39

© 2022 - 2024 — McMap. All rights reserved.