咕噜复制 - 无法加载PNG图像 [英] grunt copy - Couldn't load the png image

查看:307
本文介绍了咕噜复制 - 无法加载PNG图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的咕噜声。
我通过运行命令 grunt copy 来复制要建立的src文件夹。
但我无法打开构建文件夹(目标文件夹)中的所有png图像。
在尝试打开图像时出现致命错误。
错误:
无法载入图像
读取PNG图像文件致命错误:不是PNG文件



Grunt版本我正在使用:
grunt-cli v1.2.0,
grunt v0.4.5,
grunt-contrib-copy@1.0.0。

我已经尝试了所有可用的堆栈溢出和其他网站链接。



请帮助我。 解决方案

我得到了答案;

我在 gruntfile.js中做了一些修改

code>:


  • 添加了 grunt.loadNpmTasks('grunt-contrib-copy'); code>到 gruntfile.js 的结尾。
  • 修改了选项,如下所示:

      options:{标点符号:''} 



I am new to grunt. I am copying the src folder to build by running the command grunt copy. But I can't open all png images in the build folder(destination folder). I got a fatal error while trying to open the image. Errors: "Could not load image" "Fatal Error reading PNG image file: Not a PNG file"

Grunt versions I am using: grunt-cli v1.2.0, grunt v0.4.5, grunt-contrib-copy@1.0.0.

I have tried with all available links in stack overflow and other sites.

Kindly help me.

解决方案

I got the answer;

I've done few modifications in the gruntfile.js:

  • Added grunt.loadNpmTasks('grunt-contrib-copy'); to the end of gruntfile.js.
  • Modified the options like the following:

    options: { punctuation: '' }
    

这篇关于咕噜复制 - 无法加载PNG图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆