标签: resize

如何按比例调整图像大小/保持纵横比?

我的图像尺寸相当大,我想用jQuery缩小它们,同时保持比例受限,即相同的宽高比.

有人能指点我一些代码,还是解释逻辑?

javascript jquery resize image

146
推荐指数
6
解决办法
28万
查看次数

WPF:将宽度(和高度)设置为百分比值

说我想要一个TextBlock有它Width等于它的父容器的Width(即从一侧伸展到另一侧)或它的一个百分比的父容器Width,我怎么能做到这一点XAML,而无需指定绝对值?

我想这样做,以便如果稍后展开父容器容器(它的' Width增加),它的'子元素也将自动扩展.(基本上,就像在HTML和CSS中一样)

wpf xaml resize

144
推荐指数
5
解决办法
29万
查看次数

在上传到服务器之前,使用JavaScript调整客户端大小的图像

我正在寻找一种方法来使用JavaScript调整客户端图像的大小(实际上调整大小,而不仅仅是更改宽度和高度).
我知道可以在Flash中完成它但我想尽可能避免它.

网上某处有开源算法吗?

javascript resize image client-side

142
推荐指数
6
解决办法
17万
查看次数

如何使用CSS扩展整个网页?

使用Firefox,您只需按下即可放大整个网页CTRL +.这样做是按比例放大整个网页(字体,图像等).

如何使用简单的CSS复制相同的功能?

是否有类似的东西page-size: 150%(这将使整个页面部分增加x%?)

html css resize

141
推荐指数
7
解决办法
25万
查看次数

Android:如何以编程方式设置布局的大小

作为Android应用程序的一部分,我正在构建一个按钮集.这些按钮是嵌套的LinearLayouts集的一部分.使用权重我根据包含父LinearLayout的大小自动调整自身大小.该想法是,基于屏幕的像素数和密度,将包含布局的大小设置为多个像素; 并根据该更改让按钮设置自行调整大小.

那么问题是:如何调整布局大小.

我已经尝试了几种建议的技术,没有一种能够接近工作.以下是构建按钮集的XML的子集:

    <LinearLayout android:layout_height="104pt" android:id="@+id/numberPadLayout" android:orientation="horizontal" android:layout_width="104pt"
    android:background="#a0a0a0"
    android:layout_alignParentBottom="true" 
    android:layout_centerHorizontal="true"
>

    <LinearLayout android:layout_weight="2" android:layout_height="fill_parent" android:id="@+id/linearLayout1" android:orientation="vertical" android:layout_width="wrap_content">
        <Button android:text="1" android:id="@+id/button1" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
        <Button android:text="4" android:id="@+id/button4" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
        <Button android:text="7" android:id="@+id/button7" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
        <Button android:text="-" android:id="@+id/buttonDash" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
    </LinearLayout>
    <LinearLayout android:layout_weight="2" android:layout_height="fill_parent" android:id="@+id/linearLayout2" android:orientation="vertical" android:layout_width="wrap_content">
        <Button android:text="2" android:id="@+id/button2" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
        <Button android:text="5" android:id="@+id/button5" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
        <Button android:text="8" android:id="@+id/button8" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
        <Button android:text="0" android:id="@+id/button0" android:layout_weight="2" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
    </LinearLayout>

    <LinearLayout android:layout_weight="2" android:layout_height="fill_parent" android:id="@+id/linearLayout3" android:orientation="vertical" …
Run Code Online (Sandbox Code Playgroud)

layout android resize android-linearlayout

133
推荐指数
3
解决办法
25万
查看次数

如何使用Java调整图像大小?

我需要调整PNG,JPEG和GIF文件的大小.我怎么能用Java做到这一点?

java resize image

123
推荐指数
6
解决办法
15万
查看次数

windowSoftInputMode ="adjustResize"不适用于半透明动作/导航栏

我在新的Android KitKat(4.4)中使用半透明操作栏/导航栏时出现问题windowSoftInputMode="adjustResize".

Normaly将InputMode更改为adjustResize,应用程序应该在键盘显示时自行调整大小......但是在这里它不会!如果我删除透明效果的行,则调整大小正常.

因此,如果键盘可见,我的ListView就在它下面,我无法访问最后几个项目.(只能手动隐藏键盘)

AndroidManifest.xml中

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="XYZ"
android:versionCode="23"
android:versionName="0.1" >

<uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="19" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.XYZStyle" >
    <activity
        android:name="XYZ"
        android:label="@string/app_name"
        android:windowSoftInputMode="adjustResize" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

值-V19/styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Theme.XYZStyle" parent="@style/Theme.AppCompat.Light">
    <item name="android:windowTranslucentStatus">true</item>
    <item name="android:windowTranslucentNavigation">true</item>
</style>

</resources>
Run Code Online (Sandbox Code Playgroud)

fragment.xml之

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<ListView
    android:id="@+id/listView_contacts"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false"
    android:divider="@null"
    android:dividerHeight="0dp"
    android:drawSelectorOnTop="true"
    android:fastScrollAlwaysVisible="true"
    android:fastScrollEnabled="true"
    android:paddingBottom="@dimen/navigationbar__height" >
</ListView> …
Run Code Online (Sandbox Code Playgroud)

android resize statusbar window-soft-input-mode android-4.4-kitkat

117
推荐指数
8
解决办法
8万
查看次数

如何禁用用户的表单大小调整?

如何禁用用户的表单大小调整?使用哪个属性?

我试着AutoSizeAutoSizeMode.

c# forms resize winforms

115
推荐指数
6
解决办法
14万
查看次数

如何使用iOS轻松调整大小/优化图像大小?

我的应用程序是从网络下载一组图像文件,并将它们保存到本地iPhone磁盘.其中一些图像的尺寸非常大(例如,宽度大于500像素).由于iPhone甚至没有足够大的显示器来显示原始尺寸的图像,我计划将图像尺寸调整为更小的尺寸以节省空间/性能.

此外,其中一些图像是JPEG,并且它们不会保存为通常的60%质量设置.

如何使用iPhone SDK调整图片大小,如何更改JPEG图像的质量设置?

cocoa-touch resize image objective-c ios

111
推荐指数
6
解决办法
17万
查看次数

缩放图像以适合边界框

是否有一个仅限CSS的解决方案将图像缩放到边界框(保持纵横比)?如果图像大于容器,则此方法有效:

img {
  max-width: 100%;
  max-height: 100%;
}
Run Code Online (Sandbox Code Playgroud)

例:

但我想扩大图像,直到尺寸为容器的100%.

html css resize image autoresize

109
推荐指数
6
解决办法
29万
查看次数