Comments (4)
Has anyone found a workaround for this?
from grunt-svg2png.
Not sure if you are using 'svgmin' but I found 'svgmin' was messing it up for me. If i move it after 'svg2png' in my Gruntfile.js in grunt.registerTask(), then it generates the png properly, didn't need the xml declaration either.
from grunt-svg2png.
Another workaround for you need to run svgmin before svg2png (as if you are using grunticon), you can simply disable the removal of the xml declaration in svgmin:
svgmin: {
dist: {
options: {
plugins: [
{ removeXMLProcInst: false } // don't remove xml processing instructions (doing so causes svg2png to fail at least on win 7)
]
},
files: [{
expand: true, cwd: 'sourcedir', src: ['*.svg'], dest: 'destdir'
}]
}
}
Of course, ideally, svg2min could support files without the xml declaration.
from grunt-svg2png.
Worth mentioning... the latest version of Illustrator (I'm on v19.2.0) has a new 'Export... SVG' dialog which seems to automatically strip the declaration.
grunt-svg2png still needs this declaration in order to output a rasterized SVG graphic (rather than rasterized lines of XML code).
Grrrrr.
from grunt-svg2png.
Related Issues (20)
- Double size (@2x) HOT 3
- Image widths/aspect ratios not maintained HOT 3
- Dynamic mapping / rasterization bug HOT 5
- `spawn ENAMETOOLONG` when trying to process too many files or files with long pathes HOT 1
- Process hangs even though it is pointing to the right files HOT 5
- Allow size output setting of png HOT 2
- svg2png fails without message; libfontconfig.so.1 dependency problem HOT 2
- Prefix for png files
- Resize option HOT 2
- Progress bar is too long
- flatten: true not working
- Task Hangs HOT 1
- Warning: Path must be a string. Received [ 'path/to/one/of/the/svgs' ]
- Fails on Mac OS Sierra HOT 1
- Fatal error: write EPIPE HOT 6
- Not rasterizing HOT 1
- update ‘phantomjs’ package references to ‘phantomjs-prebuilt’ HOT 1
- Should use a carraige return on the progress bar instead of a new line? HOT 1
- Module ignores grunt filter function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-svg2png.