Flex Image - Editing images

Lets say we want the thumbnails in our app to have a border, to help them better blend into the layout. Assume that we have an image with an alpha channel that gives it a hole in the middle. We can add this image as a border using the :size => :stretch_to_fit option in the overlay options.

  flex_image :action => 'thumbnail',
             :class  => MyImage,
             :size   => '100x100',
             :overlay => {
               :file => 'public/images/border.png',
               :size => :stretch_to_fit
             }



=== Adding a logo in the corner

Stamp your sites logo on all the big images

  flex_image :action => 'show',
             :class  => MyImage,
             :size   => '640x480',
             :overlay => {
               :file      => 'public/images/logo.png',
               :alignment => :bottom_left,
               :offset    => 10 
             }


Edit documentation | (0 older versions) | Last edited by: Guest, 10 months ago