Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot parse integer value '187.5' for -w" #3

Open
olivier-w opened this issue Jul 4, 2016 · 2 comments
Open

"Cannot parse integer value '187.5' for -w" #3

olivier-w opened this issue Jul 4, 2016 · 2 comments

Comments

@olivier-w
Copy link

Any way to get around converting images that have decimals in their width? Using librsvg v2.40.15 on OS X 10.11.5

$ ./svg-resizer.js -f -y 250 -o svg/resized/ svg/*.svg

rsvg-convert -w 187.5 -h 187 --keep-aspect-ratio --dpi-x 90 --dpi-y 90 -f svg svg/adjust.svg -o svg/resized/adjust.svg

Cannot parse integer value '187.5' for -w

Error converting file: svg/adjust.svg
fs.js:565
fs.write = function(fd, buffer, offset, length, position, callback) {
                                                 ^
Error: ENOENT, no such file or directory 'svg/resized/adjust.svg'
    at Error (native)
    at Object.fs.openSync (fs.js:500:18)
    at Object.fs.readFileSync (fs.js:352:15)
    at /Users/xyz/Downloads/svg-resizer-master/svg-resizer.js:115:33
    at Array.forEach (native)
    at Object.<anonymous> (/Users/xyz/Downloads/svg-resizer-master/svg-resizer.js:62:10)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
@olivier-w
Copy link
Author

olivier-w commented Jul 4, 2016

Changed my command to: $ ./svg-resizer.js -f -y 100 -o svg/resized/ svg/*.svg and it converted them to 75px, but the resulting files are empty ¯_(ツ)_/¯

@emkayy
Copy link

emkayy commented Nov 22, 2016

I've got the same problem:
./svg-resizer.js -f -x 50 -y 50 -o ../SVG-Icons/resized ../SVG-Icons/*.svg
produces:

rsvg-convert -w 13 -h 37.5 --keep-aspect-ratio --dpi-x 90 --dpi-y 90 -f svg ../SVG-Icons/Anbieter.svg -o ../SVG-Icons/resized/Anbieter.svg
Cannot parse integer value '37.5' for -h
Error converting file: ../SVG-Icons/Anbieter.svg
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '../SVG-Icons/resized/Anbieter.svg'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at /Resources/svg-resizer/svg-resizer.js:115:33
    at Array.forEach (native)
    at Object.<anonymous> (/Resources/svg-resizer/svg-resizer.js:62:10)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)

Any clue, any advice how I could fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants