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

"Empty input file" error for image loaded from url #1

Open
wnm opened this issue Jul 9, 2012 · 0 comments
Open

"Empty input file" error for image loaded from url #1

wnm opened this issue Jul 9, 2012 · 0 comments

Comments

@wnm
Copy link

wnm commented Jul 9, 2012

I have a loop that runs through a list of image-urls and opens the url with

Miro::DominantColors.new('http://www.example.com/image.jpg')

for some images it returns:

convert: Empty input file `/tmp/source20120709-6914-7hzuos.jpg' @ error/jpeg.c/EmitMessage/236.
convert: missing an image filename `/tmp/downsampled20120709-6914-1ldgk69.png' @ error/convert.c/ConvertImageCommand/3011.
/home/wolle/.rvm/gems/ruby-1.9.3-p194/gems/cocaine-0.2.1/lib/cocaine/command_line.rb:39:in `run': Command '/usr/bin/convert '/tmp/source20120709-6914-7hzuos.jpg' -resize '150x150' -colors '8' '/tmp/downsampled20120709-6914-1ldgk69.png'' returned 1. Expected 0 (Cocaine::ExitStatusError)
    from /home/wolle/.rvm/gems/ruby-1.9.3-p194/gems/miro-0.2.1/lib/miro/dominant_colors.rb:46:in `downsample_colors_and_convert_to_png!'
    from /home/wolle/.rvm/gems/ruby-1.9.3-p194/gems/miro-0.2.1/lib/miro/dominant_colors.rb:33:in `extract_colors_from_image'
    from /home/wolle/.rvm/gems/ruby-1.9.3-p194/gems/miro-0.2.1/lib/miro/dominant_colors.rb:28:in `sorted_pixels'
    from /home/wolle/.rvm/gems/ruby-1.9.m3-p194/gems/miro-0.2.1/lib/miro/dominant_colors.rb:10:in `to_hex'
    from color.rb:23:in `get_main_color'
    from color.rb:55:in `block in start'
    from color.rb:50:in `each'
    from color.rb:50:in `start'
    from color.rb:19:in `initialize'
    from color.rb:66:in `new'
    from color.rb:66:in `<main>

i tripple checked. all the image-urls are correct. what else could be the problem?

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

1 participant