简体   繁体   English

如何更改图片的宽高比并上传到 Imgur?

[英]How to change the aspect ratio of image and upload to Imgur?

I have a drop zone where you can drop or select images.我有一个拖放区,您可以在其中拖放 select 张图片。 And I am using a background-image property to display the image.我正在使用 background-image 属性来显示图像。

I am building a post scheduler for Instagram and the API requires an Image to have an aspect ratio between the range of 4:5 to 1.91:1 .我正在为 Instagram 构建一个后期调度程序, API要求图像的宽高比在4:5 到 1.91:1之间。

So how do I change the aspect ratio of an image selected from the computer and upload it to imgur so it would have an aspect ratio between 4:5 to 1.91:1?那么如何更改从计算机中选择的图像的纵横比并将其上传到 imgur,使其纵横比在 4:5 到 1.91:1 之间?

You can easily resize images according to your aspect ratio on paint software.您可以根据画图软件的宽高比轻松调整图像大小。 If you want to maintain 4:5 ratio then your pixel calculation will be 800x1000.如果您想保持 4:5 的比例,那么您的像素计算将为 800x1000。 If you want to maintain 1.91:1 ratio then your pixel calculation will be 1200x628.如果您想保持 1.91:1 的比率,那么您的像素计算将为 1200x628。 Moreover, for the Instagram post, you can use square images with 1080x1080 with no issues.此外,对于 Instagram 帖子,您可以毫无问题地使用 1080x1080 的方形图像。 Then you can upload to any image hosting site like Imgur, Imgbb, or flicker.然后你可以上传到任何图像托管网站,如 Imgur、Imgbb 或闪烁。

Note: You can resize your image anywhere(canva, photoshop, photopea, etc.)注意:您可以在任何地方调整图像大小(canva、photoshop、photopea 等)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM