首页 > 解决方案 > 缩放大图像的最佳方法

问题描述

是否有最好的工具来为 android 工作室缩放多个图像。我已经尝试过 Android Drawable 导入器和其他各种工具,但我不断收到内存不足错误

我正在 Adob​​e illustrator 中制作图像

结果表格 Adob​​e Illustrator 缩放后

for l-dpi 

810 x 1440

for m-dpi

1080 x 1920 

for h-dpi 


1620 x 2880

for xhdpi

2160 x3840

for xxhdpi

3240 x 5760

for xxxhdpi

4320 x 7680

我在项目中使用但直到 outOfMemoryException 的图像像素:

for l-dpi 

151 x 270 (seven images that have these dimensions)
191 x 284 (other seven images that have these dimensions)

for m-dpi

202 x 360 
255 x 379 

for hdpi

303 x 540
382 x 569

xhdpi

405 x 720
510 x 759

xxhdpi

607 x 1080
765 x 1139

xxxhdpi

810 x 1440
1020 x 1519 

我的项目包含大量图像,因此任何简单的方法都可以在大规模上正确缩放

标签: javaandroid

解决方案


除了减小大小之外,您显然还应该尝试将它们的位深度精确地减小到 8 位。默认情况下,全彩是 32 位,是 4 倍大。


推荐阅读