retina_rails icon indicating copy to clipboard operation
retina_rails copied to clipboard

retina_rails ignores convert options

Open Waylon87 opened this issue 10 years ago • 2 comments

I'm having an issue where retina rails is ignoring the convert_options that I set.

:convert_options => { :twitter => "-background white -compose Copy -gravity center -extent 640x640" }

It converts fine when I turn retina rails off.

I also noticed that retina rails does not respect percentages in the style options, it seems to be converting them to pixels.

I will try to investigate further in the code to see if I can come up with a solution.

Waylon87 avatar Oct 11 '14 21:10 Waylon87

Could you show me the code in your model?

jhnvz avatar Oct 11 '14 23:10 jhnvz

@jhnvz See below.

retina!
has_attached_file :image,
    :styles => { :large => "400x", :grid => "320x", :thumb => "120x", :facebook => "100%x100%>", :twitter => "640x640>" }
    :convert_options => {
        :twitter => "-background white -compose Copy -gravity center -extent 640x640",
        :facebook => "-background white -compose Copy -gravity center -extent 191%x100%"
    },
    :storage => :s3,
    :s3_credentials => "#{Rails.root}/config/s3.yml",
    :path => ":class/:attachment/:id/:style/:filename",
    :s3_headers => { 'Cache-Control' => 'max-age=315576000', 'Expires' => 10.years.from_now.httpdate },
    :retina => { :quality => 80 }

Waylon87 avatar Oct 11 '14 23:10 Waylon87