简体   繁体   English

上传所有移动设备时如何调整图像大小?

[英]How to resize image when upload for all mobile devices?

I just build a sample react native project I a have a problem when original image I uploaded in server not fit all screen on another mobile screens (IOS, Android) 我只是构建了一个示例本机项目,当我在服务器中上传的原始图像无法容纳另一个移动屏幕(IOS,Android)上的所有屏幕时,我遇到了问题

I need to resize the image according to each device resolution? 我需要根据每个设备的分辨率调整图像大小吗?

Please help me to solve this problem 请帮我解决这个问题

Androi Guides - Support different screen sizes Androi指南-支持不同的屏幕尺寸

Apple image size 苹果图像尺寸

尝试像这样设置resizeMode拉伸

<Image soure={image} style={{width:200, height:200, resizeMode:'stretch'}} />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何处理 window 调整大小以显示具有 devicepixelratio 的移动设备的 canvas - How to handle window resize for displaying canvas for mobile devices with devicepixelratio 在上传到服务器之前如何用Picasso调整图像大小? - How to resize image with Picasso before upload to server? 如何自动调整大小,兼容,调整所有Android设备的屏幕大小 - how to auto resize, compatible, adjust screen size for all android devices 在聚焦输入时,在iOS(和所有移动设备)上自定义滚动 - Custom scrolling on iOS (and all mobile devices) when input is focused 如何将图像上传到服务器,包括原始图像和调整图像大小? - how to upload image to server include original and resize image? 适用于所有移动设备的相同设计 - same Design for All Mobile Devices 如何在Android中支持所有设备(移动设备和平板电脑)? - How to support all devices( Both mobile and Tablets) in android? 如何使移动网页在所有设备上显示相同 - How to get a mobile webpage to display the same on all devices 如何将手机和平板电脑分开来检测所有手持设备? - How to detect all handheld devices with separation of mobile and tablet? 为所有移动设备设计计算器 - Designing Calculator for all Mobile Devices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM