I don't think so. For some people, I'm sure this solution is helpful, but I
don't think it's general enough to put into the core (not everyone will want
to crop their photos this way). If we can make it a configuration opetion
using application.yml, I'd be fine with that (as long as the default is to
crop using the normal method).

Thanks!
Bruno

On Sun, Feb 15, 2009 at 8:28 PM, sachin kale <[email protected]> wrote:

> Thanks, the solution worked as pasted!
>
> attachment_fu guys are working on cropper script for users being able to
> select the part to be thumbnailed, hope it will come soon.
>
> Till then should this solution be part of CE?, I am sure everybody does
> have this problem.
>
>
> On Sun, Feb 15, 2009 at 2:06 AM, sprite <[email protected]> wrote:
>
>>
>> Override in the photos model
>>
>>  # Anchor image resizing to top to avoid cutting off heads!
>>  def resize_image(img, size)
>>    size = size.first if size.is_a?(Array) && size.length == 1 && !
>> size.first.is_a?(Fixnum)
>>    if size.is_a?(Fixnum) || (size.is_a?(Array) && size.first.is_a?
>> (Fixnum))
>>      img.crop_resized!(size, size, Magick::NorthGravity)
>>    else
>>      img.change_geometry(size.to_s) { |cols, rows, image|
>>        image.crop_resized!(cols, rows, Magick::NorthGravity)
>>      }
>>    end
>>    self.temp_path = write_to_temp_file(img.to_blob)
>>  end
>>
>> On Feb 14, 7:54 am, Bruno Bornsztein <[email protected]>
>> wrote:
>> > I think there's a 'gravity' setting you can pass:
>> >
>> >
>> http://www.imagemagick.org/RMagick/doc/imageattrs.html#gravityhttp://www.imagemagick.org/RMagick/doc/imusage.html#geometry<http://www.imagemagick.org/RMagick/doc/imageattrs.html#gravityhttp://www.imagemagick.org/RMagick/doc/imusage.html%23geometry>
>> >
>> > On Sat, Feb 14, 2009 at 9:14 AM, Sachin <[email protected]> wrote:
>> >
>> > > Hi,
>> >
>> > > When someone uploads image with height greater than(almost twice) the
>> > > width, the thumbnail generated points to the center of the image,
>> > > which misses the face, as mostly face will be in upper portion of the
>> > > image.
>> > > I know that having a image cropper javascript for allowing users to
>> > > select portion for thumbnail would be a bigger task, but if we could
>> > > quickfix or hack a solution of generating thumbnail with upper portion
>> > > of the image with rmagick/image-magick that would be great.
>> >
>> > > I tried finding any settings/config about rmagick/imagemagick but was
>> > > not successful.
>> >
>> > > Has anyone tried this?
>> >
>> > > Please point me to correct direction.
>> >
>> > > Thanks,
>> > > Sachin
>>
>>
>
>
> --
> Sachin Kale
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to