Skip to content

Broken output image #53

@kdelchev

Description

@kdelchev

I got broken image when trying to create an image from an address. Here is my code:

kit = IMGKit.new("http://www.abv.bg/")
kit.to_file(Rails.root + "public/image.jpg")

Configuration is
`require 'imgkit'

IMGKit.configure do |config|
config.wkhtmltoimage = "c:/Program Files (x86)/wkhtmltopdf/wkhtmltoimage.exe"
config.default_options = {
:quality => 100,
# :encoding => "ASCII-8BIT", # tried with both and without encoding
:encoding => "UTF-8",
:binmode => false # tried also without this
}
config.default_format = :jpg
end
`
The result is
image

When run the command in the console a valid image is created:
wkhtmltoimage "http://www.abv.bg" "d:\image.jpg"

Also tried with both 0.10.0.rc2 and 0.11.0.rc1 versions of wkhtmltoimage.

I am on Windows 7 64bit, Rails 3.2.13, got ImageMagick (if this is important).

Any help or ideas are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions