File_column image versions

does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i’m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.

Josh K. wrote:

does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i’m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.

Try SuperImage instead. It supports dynamic resizing of images at
runtime, and includes options to crop to a specific size.

http://mydomain.com/images/123?size=125x125&crop=true

I believe file_column only creates the image version when you first
upload the image, but SuperImage allows you to dynamically generate what
you need.

Alex W. wrote:

Josh K. wrote:

does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i’m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.

Try SuperImage instead. It supports dynamic resizing of images at
runtime, and includes options to crop to a specific size.

http://mydomain.com/images/123?size=125x125&crop=true

I believe file_column only creates the image version when you first
upload the image, but SuperImage allows you to dynamically generate what
you need.

Oops, forgot link:
http://beautifulpixel.com/super_image/index.html

Josh K. wrote:

Alex W. wrote:

Alex W. wrote:

Josh K. wrote:

does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i’m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.

Try SuperImage instead. It supports dynamic resizing of images at
runtime, and includes options to crop to a specific size.

http://mydomain.com/images/123?size=125x125&crop=true

I believe file_column only creates the image version when you first
upload the image, but SuperImage allows you to dynamically generate what
you need.

Oops, forgot link:
http://beautifulpixel.com/super_image/index.html

how is this on speed? i’m working on a site that has high traffic loads
so i think i would rather have the images already generated beforehand.

As long as you use cacheing there will be no difference. The initial
generation of each image will be a small hit, but page_cacheing makes it
snappy after that.

class MyControllerNameController < ApplicationController
include SuperImagePlugin::Show
image_action :show_my_image
caches_page :show_my_image
end

would do the trick.

Alex W. wrote:

Alex W. wrote:

Josh K. wrote:

does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i’m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.

Try SuperImage instead. It supports dynamic resizing of images at
runtime, and includes options to crop to a specific size.

http://mydomain.com/images/123?size=125x125&crop=true

I believe file_column only creates the image version when you first
upload the image, but SuperImage allows you to dynamically generate what
you need.

Oops, forgot link:
http://beautifulpixel.com/super_image/index.html

how is this on speed? i’m working on a site that has high traffic loads
so i think i would rather have the images already generated beforehand.

Is Sebastian still maintaining file_column?

Do you see any potential to merge your versions or take over
development?

i actually got what i wanted. i accomplished it with this in my model:

class Photo < ActiveRecord::Base
file_column :image,
:magick => { :versions => { :thumb => { :crop => ‘1:1’,
:geometry => ‘50x50’ },
:medium => { :geometry =>
‘400x400>’ }
}
}
end

On 6/6/06, Josh K. [email protected] wrote:

does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i’m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.

http://svn.kylemaxwell.com/file_column (my file_column branch).
There’s no “versions”. Instead, you can specify one initial, optional
transformation, using the ImageMagick command-line syntax:

file_column :image_field, :magick => “-resize 1000x”

And you can specify an arbitrary number of view transformations using:

<%=url_for_file_column “model”, “image_field”, :magick => "-rotate 90

  • resize 40x10!" %>


Kyle M.
Chief Technologist
E Factor Media // FN Interactive
[email protected]
1-866-263-3261