离子启动画面(错误:无法读取上传的图像) [英] Ionic splash screen (error: unable to read uploaded image)
问题描述
我正在尝试使用离子资源--splash命令,我有一个splash.png文件保存在我的资源文件夹以及我的ios和android文件夹的根目录中,它是2208 x 2208这是建议大小。但是当我运行命令时,我收到以下错误
I am trying to use the ionic resources --splash command, I have a splash.png file saved in my resources folder as well as in the root of my ios and android folders, and it is 2208 x 2208 which is the advised size. But when I run the command I get the following error
无效上传:无法读取上传的图片
"Invalid upload: unable to read uploaded image"
我在config.xml中添加了启动画面首选项。他们没有指定更多的条件吗?
I have added the splash screen preference in my config.xml. Is there more conditions that they didn't specify?
推荐答案
我刚才意识到我的图像实际上是Adobe Illustrator图像。我所要做的就是将图像从.png重命名为.ai并且它有效!
I just realized that the image I had was actually an Adobe Illustrator image. All I had to do was rename the image from .png to .ai and it worked!
对于那些想知道的人,可以快速解释两者之间的区别:
For those wondering here is a quick explanation on the difference between the two:
.ai - Adobe Illustrator矢量文件可以向下和向上扩展。
.ai - Adobe Illustrator vector files are scalable both down and up.
.png - 像素文件可以按比例缩小,而不是向上。
.png - pixel files can be scaled down, not up.
这篇关于离子启动画面(错误:无法读取上传的图像)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!