noosfero | Image crop (!1424)

Rodrigo Souto gitlab at mg.gitlab.com
Thu Apr 19 15:45:52 BRT 2018


Rodrigo Souto started a new discussion on app/models/concerns/cropped_image.rb:

> +module CroppedImage
> +
> +  extend ActiveSupport::Concern
> +
> +  included do
> +    attr_accessible :crop_x, :crop_y, :crop_w, :crop_h
> +    attr_accessor :crop_x, :crop_y, :crop_w, :crop_h
> +
> +    before_save :load_image_and_crop
> +
> +    protected
> +
> +    def load_image_and_crop
> +      if %w(.jpeg .jpg .png .gif).include? File.extname(temp_path)

I think we should add `.bmp` and `.tiff` on this list as well.

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1424#note_69360538
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180419/237fd496/attachment.html>


More information about the Noosfero-dev mailing list