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. -- Posted via http://www.ruby-forum.com/.
Alex Wayne wrote:> Josh Kieschnick 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 -- Posted via http://www.ruby-forum.com/.
Alex Wayne wrote:> Alex Wayne wrote: >> Josh Kieschnick 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.htmlhow 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. -- Posted via http://www.ruby-forum.com/.
Josh Kieschnick wrote:> Alex Wayne wrote: >> Alex Wayne wrote: >>> Josh Kieschnick 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. -- Posted via http://www.ruby-forum.com/.
Josh Kieschnick 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. -- Posted via http://www.ruby-forum.com/.
On 6/6/06, Josh Kieschnick <jjkiesch@gmail.com> 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 Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
Is Sebastian still maintaining file_column? Do you see any potential to merge your versions or take over development?> From: Kyle Maxwell <kyle@kylemaxwell.com> > Reply-To: <rails@lists.rubyonrails.org> > Date: Wed, 7 Jun 2006 08:26:49 -0700 > To: <rails@lists.rubyonrails.org> > Subject: Re: [Rails] file_column image versions > > On 6/6/06, Josh Kieschnick <jjkiesch@gmail.com> 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 Maxwell > Chief Technologist > E Factor Media // FN Interactive > kyle@efactormedia.com > 1-866-263-3261 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
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 -- Posted via http://www.ruby-forum.com/.