aspect-ratio

ImageMagick: how to minimally crop an image to a certain aspect ratio?

痞子三分冷 提交于 2019-12-18 11:44:45
问题 With imagemagick, I'd like to crop an image, in a minimal fashion, so that it fits a given aspect ratio. Example: given an image of, say, 3038 x 2014 px, I want to crop it to have a 3:2 aspect ratio. The resulting image would then be 3021 x 2014 px, cropped from the, say, center of the original image. So looking for a command looking something like convert in.jpg -gravity center -crop_to_aspect_ratio 3:2 out.jpg . 回答1: 1. Specific target resolution If your goal at the end is to have a certain

Field of view + Aspect Ratio + View Matrix from Projection Matrix (HMD OST Calibration)

我的梦境 提交于 2019-12-18 06:50:10
问题 I'm currently working on an Augmented reality application. The targetted device being an Optical See-though HMD I need to calibrate its display to achieve a correct registration of virtual objects. I used that implementation of SPAAM for android to do it and the result are precise enough for my purpose. My problem is, calibration application give in output a 4x4 projection matrix I could have directly use with OpenGL for exemple. But, the Augmented Reality framework I use only accept optical

Field of view + Aspect Ratio + View Matrix from Projection Matrix (HMD OST Calibration)

泪湿孤枕 提交于 2019-12-18 06:50:06
问题 I'm currently working on an Augmented reality application. The targetted device being an Optical See-though HMD I need to calibrate its display to achieve a correct registration of virtual objects. I used that implementation of SPAAM for android to do it and the result are precise enough for my purpose. My problem is, calibration application give in output a 4x4 projection matrix I could have directly use with OpenGL for exemple. But, the Augmented Reality framework I use only accept optical

Android VideoView crop_center

末鹿安然 提交于 2019-12-17 19:21:41
问题 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_gravity="center" android:foregroundGravity="center" android:gravity="center" android:orientation="horizontal" > <VideoView android:id="@+id/videoViewPanel" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" android:layout_centerInParent="true"/> <

Mosaic of images HTML/CSS

戏子无情 提交于 2019-12-17 06:35:56
问题 I want to make an image layout with portrait images inside a div with a fixed aspect ratio of 3:2 . The size of images is 327x491px . The main issue is unwanted spaces between images. How do I align images as a mosaic using only HTML/CSS ? HTML : <div id="pictures1" class="_pictures1 grid"> <div class="_pictures1-01"><div style="width:125px;height: 188px; background: red;"><img src="" width="125" height="188" alt="" /></div></div> <div class="_pictures1-02"><div style="width:192px;height:

How to scale SVG image to fill browser window?

夙愿已清 提交于 2019-12-17 04:44:33
问题 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 scrolling and while preserving its aspect ratio. For example, at the moment I have a 1024x768 SVG image; if the browser viewport is 1980x1000 then I want the image to display at 1333x1000 (fill vertically, centred horizontally). If the browser was 800x1000 then I want it to display at 800x600 (fill

Maintain div aspect ratio according to height

拜拜、爱过 提交于 2019-12-17 04:32:26
问题 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-left as a percentage will be a percentage of the width of an object, not its height. So with markup like this: <div class="box"> <div class="inner"></div> </div> I'd like to use something like this: .box { position: absolute; margin-top: 50%; bottom: 0; } .inner { padding-left: 200%; } To ensure

Is there a list of screen resolutions for all Android based phones and tablets? [closed]

倖福魔咒の 提交于 2019-12-17 02:20:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . If not, is there a list of screen resolutions for the most popular Android phones and tablets. 回答1: (out of date) Spreadsheet of device metrics. SEE ALSO: Device Metrics - Material Design. Screen Sizes. --------------------------- ----- ------------ --------------- ------- ----------- ---------------- --- --------

Image Resizing in (PHP/GD)

倾然丶 夕夏残阳落幕 提交于 2019-12-14 00:29:16
问题 I'm looking for help/suggestions in finding the most efficient way to resize an image to be as small as possible using PHP/GD while preserving the aspect ratio of the original image but ensuring the the resized image is bigger than a defined minimum width & height. For example, the resized image must have a width >= 400 and a height >= 300 but should be as close to those dimensions as possible while maintaining the original aspect ratio. Such that a "landscape" image would have an ideal

squared boxes by height (not width) to create equal width (aspect ratio)

随声附和 提交于 2019-12-13 17:26:38
问题 I know the squared solution with :before { padding-bottom } . This works only with a width value, because padding is always using a relation to the parents width. - But exactly this is my problem. I ONLY have the value of the a fixed HEIGHT (by parent container) and I need squared boxes by that height value. I don't like to use JS. If there is a solution to REPLACE the STATIC WIDTH value with pure CSS, please tell me! Here's a simple code sample: div.wrapper { height: 70px; padding: 5px;