0

I am doing these in my model

def self.get_store_resize_image(filename, store_id)

    filename=filename.gsub(' ', '%20')

    image = MiniMagick::Image.open(filename) #getting error here
    image.resize "252x185"  ## The thumbnail size

    temp_file_name="#{Time.now.to_time.to_i}_#{store_id}"
    @store_image_path="#{Rails.root}/public/tmp/#{temp_file_name}.png"
    @store_image="/tmp/#{temp_file_name}.png"
    image.write(@store_image_path)
    return @store_image
end

how can I fix "\xFF" from ASCII-8BIT to UTF-8 error ?

Yu Hao
  • 115,525
  • 42
  • 225
  • 281
Mitesh Sharma
  • 123
  • 2
  • 8

0 Answers0