Git Product home page Git Product logo

Comments (5)

iazrael avatar iazrael commented on August 10, 2024

input.format 设置为 "png,gif"就能把png和gif一起合并了

from ispriter.

iazrael avatar iazrael commented on August 10, 2024

目前可以排除掉不想合并的图片, 可以使用通配符, 查看 https://github.com/iazrael/ispriter/blob/master/CONFIG.md 看详细说明.

   /**
     * 排除不想合并的图片, 可使用通配符
     * 也可以直接在 css 文件中, 在不想合并的图片 url 后面添加 #unsprite, iSpriter 会排除该图片, 并把 #unsprite 删除
     * 
     * @optional
     * @example
     * "ignoreImages": "icons/*"
     * "ignoreImages": ["icons/*", "loading.png"]
     */
    "ignoreImages": ["*logo.png"],

from ispriter.

wangzhiwei1888 avatar wangzhiwei1888 commented on August 10, 2024

{
"debug": true,

"workspace": "../../", // 相对于当前目录, ../../ 也就是根目录

"input": {

    "format": "png,gif",
    "cssRoot":"test/css/style.css",

},
"output": {

    "cssDist": "examples/test1/css/",

    "imageDist": "../img/",

    "margin": 30,



    "copyUnspriteImage": true
}

}

D:\nodejs\12\test\examples\test1>ispriter -c config.json

1389247490932 not match image bg: url(../img/add_01.gif)
<<<===================
1389247490934 not match image bg: url(../img/add_02.gif)
<<<===================
1389247490935 not match image bg: url(../img/add_03.gif)
<<<===================
Output image: examples\test1\img\sprite_style.png
Output css: examples\test1\css\style.css
All done: Time use: 85 ms

然后只把png合了,gif的没有合。output里面也尝试加了 "format": "png,gif", 但还是有问题。会在imageDist目录生成一个.png.gif的文件。

from ispriter.

iazrael avatar iazrael commented on August 10, 2024

不好意思, 我刚刚测试了 gif, 目前 node-png 不支持读取gif图片, 所以还无法合并 gif, 我会在下个版本加上 gif支持

from ispriter.

wangzhiwei1888 avatar wangzhiwei1888 commented on August 10, 2024

期待...

from ispriter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.