Hi there, I''m happy to announce a new minor release of file_column. It contains two small fixes. * You can now serialize objects that have a file_column again, which is important if you want to store these objects into the flash or the session. * If you want to use the RMagick integration and you''ve installed RMagick yourself (instead of as a gem) it should work right out of the box. Apart from these fixes, the plugin is finally available at a public svn repository, so that you can use the cool new plugin script, rails features in its latest release candidate. The repository is at: https://opensvn.csie.org/rails_file_column/plugins/file_column/ Installation is as easy as typing ./script/plugin install https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk (you can still get an archive at http://www.kanthak.net/opensource/file_column/) in your project''s directory. Warning: The trunk can be unstable. You can find stable releases in the tags directory. Is there a standard way of telling the plugin script about which version to use? I''m a bit confused here, because the standard layout of plugin repositories does not seem to contain the standard tags or branches directories. Can somebody educate me about the repository conventions for plugins? How do you make sure as a plugin developer, that your users only use stable versions by default? On a different note, I need some input on the future directions of file_column, so that it suits your needs as well as possible. I have already discussed some of these ideas with Kyle Maxwell. Thanks a lot for your input, Kyle! Basically I want to keep file_column as lean and general as possible, while providing some more features that have been requested often and making it easy for you to implement your more exotic needs. So here are two points, where I''d be happy about feedback: * Right now, I''m using the RMagick library to use the imagemagick toolkit. Is it hard to get this working under Windows? Would you prefer file_column calling the imagemagick commands directly? I''d like to keep the dependency on the RMagick library as it allows for much more beautiful code and easier handling of images. * The versions feature allows you to declare in the model, that several different sizes of an image should be stored that can subsequently be accessed from your view. Kyle and I feel that this information doesn''t really belong into the model, so Kyle suggested that you can specify a geometry string in the view''s url_for_file_column method. If an image does not exist in these dimensions already, it will be created transparently and stored so that it can be used again in the next request. What do you think about this feature? Does it make sense? Should it replace the declaration of versions in the model completely or should it be an additional feature? Thanks for all the encouranging feedback I have received so far! Sebastian
The plus side is that if you add a new size, you don''t have to re-input the images to get the new sizes. I think that this is a great idea as long as the images are generated only if they don''t already exist. Having to call ImageMagick for every request would kill performance for us on the 5MM/month page view site we are developing. The thing I like about having it in the model is that I don''t have to type that geometry string all over... DRY and all that good stuff.> From: Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Reply-To: <sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org>, <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Date: Tue, 15 Nov 2005 01:34:57 +0100 > To: Rails <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Subject: [Rails] [ANN] file_column 0.3.1 with SVN repository > > * The versions feature allows you to declare in the model, that > several different sizes of an image should be stored that can > subsequently be accessed from your view. Kyle and I feel that this > information doesn''t really belong into the model, so Kyle suggested > that you can specify a geometry string in the view''s > url_for_file_column method. If an image does not exist in these > dimensions already, it will be created transparently and stored so > that it can be used again in the next request. > > What do you think about this feature? Does it make sense? Should it > replace the declaration of versions in the model completely or should > it be an additional feature?
Hi Sebastian, thanks this new release! just fyi, i think there maybe a typo in the install url? I only managed to install with ''http'' instead of ''https'' about the last feature you asked about, I used kyle''s original imagemagick helpers for a while and found them very useful for stages in development when thumbnail sizes may vary. my (humble) 2 cents would be that it makes sense and keeping versions defined only in the view would keep things DRY... - Oliver 2005/11/14, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> Hi there, > > I''m happy to announce a new minor release of file_column. It contains > two small fixes. > > * You can now serialize objects that have a file_column again, which > is important if you want to store these objects into the flash or the > session. > > * If you want to use the RMagick integration and you''ve installed > RMagick yourself (instead of as a gem) it should work right out of the > box. > > > Apart from these fixes, the plugin is finally available at a public > svn repository, so that you can use the cool new plugin script, rails > features in its latest release candidate. The repository is at: > > https://opensvn.csie.org/rails_file_column/plugins/file_column/ > > Installation is as easy as typing > > ./script/plugin install > https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > > (you can still get an archive at http://www.kanthak.net/opensource/file_column/) > > in your project''s directory. Warning: The trunk can be unstable. You > can find stable releases in the tags directory. Is there a standard > way of telling the plugin script about which version to use? I''m a bit > confused here, because the standard layout of plugin repositories does > not seem to contain the standard tags or branches directories. Can > somebody educate me about the repository conventions for plugins? How > do you make sure as a plugin developer, that your users only use > stable versions by default? > > > On a different note, I need some input on the future directions of > file_column, so that it suits your needs as well as possible. I have > already discussed some of these ideas with Kyle Maxwell. Thanks a lot > for your input, Kyle! > > Basically I want to keep file_column as lean and general as possible, > while providing some more features that have been requested often and > making it easy for you to implement your more exotic needs. So here > are two points, where I''d be happy about feedback: > > * Right now, I''m using the RMagick library to use the imagemagick > toolkit. Is it hard to get this working under Windows? Would you > prefer file_column calling the imagemagick commands directly? I''d like > to keep the dependency on the RMagick library as it allows for much > more beautiful code and easier handling of images. > > * The versions feature allows you to declare in the model, that > several different sizes of an image should be stored that can > subsequently be accessed from your view. Kyle and I feel that this > information doesn''t really belong into the model, so Kyle suggested > that you can specify a geometry string in the view''s > url_for_file_column method. If an image does not exist in these > dimensions already, it will be created transparently and stored so > that it can be used again in the next request. > > What do you think about this feature? Does it make sense? Should it > replace the declaration of versions in the model completely or should > it be an additional feature? > > > Thanks for all the encouranging feedback I have received so far! > > Sebastian > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 11/15/05, Hunter Hillegas <lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf@public.gmane.org> wrote:> The plus side is that if you add a new size, you don''t have to re-input the > images to get the new sizes.good point.> I think that this is a great idea as long as the images are generated only > if they don''t already exist. Having to call ImageMagick for every request > would kill performance for us on the 5MM/month page view site we are > developing.yes, the resized images would be stored in the file_column directory by default so that they aren''t regenerated if the same size is requested again.> The thing I like about having it in the model is that I don''t have to type > that geometry string all over... DRY and all that good stuff.you could put the geometry string in a helper to keep DRY. Another option would be to keep the definition in the model as a way to define short-names for geometry strings. Sebastian
On 11/15/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> just fyi, i think there maybe a typo in the install url? I only > managed to install with ''http'' instead of ''https''oh, good catch. You need a svn account for the https URL to work... So here is the correct URL again: http://opensvn.csie.org/rails_file_column/plugins/file_column/ Installation is as easy as typing ./script/plugin install http://opensvn.csie.org/rails_file_column/plugins/file_column/trunk Sebastian
On 11/15/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How do you make sure as a plugin developer, that your users only use > stable versions by default?>From what I can tell, at the moment the plugin script''s installmechanism won''t recognise tags or branches at all, if if I''m right (please someone tell me I''m not?) if you have your repository organised something like: svn://your_svn_url/your_plugin |-trunk |-branches |-tags |-0.1.0 |-0.1.1 ... then script/plugin install will pull the whole repository down :S I believe (from a comment that I posted on the wiki Plugins page) that some work is being done to support tagged releases, but I''m not sure when or what we''ll see. Fingers crossed... - james
Personally, I like this last option. Sounds concise.> From: Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Reply-To: <sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org> > Date: Tue, 15 Nov 2005 10:45:57 +0100 > To: Hunter Hillegas <lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf@public.gmane.org> > Cc: Rails <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > > The thing I like about having it in the model is that I don''t have to type >> that geometry string all over... DRY and all that good stuff. > > you could put the geometry string in a helper to keep DRY. Another > option would be to keep the definition in the model as a way to define > short-names for geometry strings.
Sebastian Kanthak <skanthak@...> writes:> > * Right now, I''m using the RMagick library to use the imagemagick > toolkit. Is it hard to get this working under Windows? Would you > prefer file_column calling the imagemagick commands directly? I''d like > to keep the dependency on the RMagick library as it allows for much > more beautiful code and easier handling of images. >I found it a snap to get working under windows as-is. Dave
Hi there, First of all thank you very much for this excellent plugin. Answering your questions... yes, I run RMagick in Windows and it is a @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure out which upgrade broke it. But it is not your fault. :-( Now the request... 8-) One feature I could really use is something like a before_filter... I made a "poor man''s Flickr" for my wedding pictures (not using file_column) and one of the things I do besides the resizing is a crop to make the thumbnail square, a la Flickr. Setting the JPG compression would be another use for this pre-processing. More fancy ImageMagick processing could also be easily integrated... Anyway... just throwing some ideas around. ;-) On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi there, > > I''m happy to announce a new minor release of file_column. It contains > two small fixes. > > * You can now serialize objects that have a file_column again, which > is important if you want to store these objects into the flash or the > session. > > * If you want to use the RMagick integration and you''ve installed > RMagick yourself (instead of as a gem) it should work right out of the > box. > > > Apart from these fixes, the plugin is finally available at a public > svn repository, so that you can use the cool new plugin script, rails > features in its latest release candidate. The repository is at: > > https://opensvn.csie.org/rails_file_column/plugins/file_column/ > > Installation is as easy as typing > > ./script/plugin install > https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > > (you can still get an archive at http://www.kanthak.net/opensource/file_column/) > > in your project''s directory. Warning: The trunk can be unstable. You > can find stable releases in the tags directory. Is there a standard > way of telling the plugin script about which version to use? I''m a bit > confused here, because the standard layout of plugin repositories does > not seem to contain the standard tags or branches directories. Can > somebody educate me about the repository conventions for plugins? How > do you make sure as a plugin developer, that your users only use > stable versions by default? > > > On a different note, I need some input on the future directions of > file_column, so that it suits your needs as well as possible. I have > already discussed some of these ideas with Kyle Maxwell. Thanks a lot > for your input, Kyle! > > Basically I want to keep file_column as lean and general as possible, > while providing some more features that have been requested often and > making it easy for you to implement your more exotic needs. So here > are two points, where I''d be happy about feedback: > > * Right now, I''m using the RMagick library to use the imagemagick > toolkit. Is it hard to get this working under Windows? Would you > prefer file_column calling the imagemagick commands directly? I''d like > to keep the dependency on the RMagick library as it allows for much > more beautiful code and easier handling of images. > > * The versions feature allows you to declare in the model, that > several different sizes of an image should be stored that can > subsequently be accessed from your view. Kyle and I feel that this > information doesn''t really belong into the model, so Kyle suggested > that you can specify a geometry string in the view''s > url_for_file_column method. If an image does not exist in these > dimensions already, it will be created transparently and stored so > that it can be used again in the next request. > > What do you think about this feature? Does it make sense? Should it > replace the declaration of versions in the model completely or should > it be an additional feature? > > > Thanks for all the encouranging feedback I have received so far! > > Sebastian > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- CrisDias, o Síndico www.vilago.com.br -- Seu site vai gostar de morar aqui
Yeah, I too would definetly like to have a way to crop the photo being uploaded in an effort to consistently make square thumbnails. I''d be interested to see how others are doing this currently while using FileColumn. Many thanks for FileColumn, it''s a huge time saver. Kyle Heon kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cristiano Dias Sent: Tuesday, November 15, 2005 8:05 PM To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository Hi there, First of all thank you very much for this excellent plugin. Answering your questions... yes, I run RMagick in Windows and it is a @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure out which upgrade broke it. But it is not your fault. :-( Now the request... 8-) One feature I could really use is something like a before_filter... I made a "poor man''s Flickr" for my wedding pictures (not using file_column) and one of the things I do besides the resizing is a crop to make the thumbnail square, a la Flickr. Setting the JPG compression would be another use for this pre-processing. More fancy ImageMagick processing could also be easily integrated... Anyway... just throwing some ideas around. ;-) On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi there, > > I''m happy to announce a new minor release of file_column. It contains > two small fixes. > > * You can now serialize objects that have a file_column again, which > is important if you want to store these objects into the flash or the > session. > > * If you want to use the RMagick integration and you''ve installed > RMagick yourself (instead of as a gem) it should work right out of the > box. > > > Apart from these fixes, the plugin is finally available at a public > svn repository, so that you can use the cool new plugin script, rails > features in its latest release candidate. The repository is at: > > https://opensvn.csie.org/rails_file_column/plugins/file_column/ > > Installation is as easy as typing > > ./script/plugin install > https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > > (you can still get an archive at > http://www.kanthak.net/opensource/file_column/) > > in your project''s directory. Warning: The trunk can be unstable. You > can find stable releases in the tags directory. Is there a standard > way of telling the plugin script about which version to use? I''m a bit > confused here, because the standard layout of plugin repositories does > not seem to contain the standard tags or branches directories. Can > somebody educate me about the repository conventions for plugins? How > do you make sure as a plugin developer, that your users only use > stable versions by default? > > > On a different note, I need some input on the future directions of > file_column, so that it suits your needs as well as possible. I have > already discussed some of these ideas with Kyle Maxwell. Thanks a lot > for your input, Kyle! > > Basically I want to keep file_column as lean and general as possible, > while providing some more features that have been requested often and > making it easy for you to implement your more exotic needs. So here > are two points, where I''d be happy about feedback: > > * Right now, I''m using the RMagick library to use the imagemagick > toolkit. Is it hard to get this working under Windows? Would you > prefer file_column calling the imagemagick commands directly? I''d like > to keep the dependency on the RMagick library as it allows for much > more beautiful code and easier handling of images. > > * The versions feature allows you to declare in the model, that > several different sizes of an image should be stored that can > subsequently be accessed from your view. Kyle and I feel that this > information doesn''t really belong into the model, so Kyle suggested > that you can specify a geometry string in the view''s > url_for_file_column method. If an image does not exist in these > dimensions already, it will be created transparently and stored so > that it can be used again in the next request. > > What do you think about this feature? Does it make sense? Should it > replace the declaration of versions in the model completely or should > it be an additional feature? > > > Thanks for all the encouranging feedback I have received so far! > > Sebastian > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- CrisDias, o Síndico www.vilago.com.br -- Seu site vai gostar de morar aqui _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
my guess is that you''d pass a :crop argument just like you can with :geometry? I''m assuming (haven''t tested it yet) that all imagemagick commands are accessible this way: http://www.imagemagick.org/script/command-line-options.php#crop 2005/11/15, Kyle Heon <kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:> Yeah, I too would definetly like to have a way to crop the photo being > uploaded in an effort to consistently make square thumbnails. > > I''d be interested to see how others are doing this currently while using > FileColumn. > > Many thanks for FileColumn, it''s a huge time saver. > > Kyle Heon > kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cristiano Dias > Sent: Tuesday, November 15, 2005 8:05 PM > To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > > Hi there, > > First of all thank you very much for this excellent plugin. > > Answering your questions... yes, I run RMagick in Windows and it is a > @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure > out which upgrade broke it. But it is not your fault. :-( > > Now the request... 8-) One feature I could really use is something like a > before_filter... I made a "poor man''s Flickr" for my wedding pictures (not > using file_column) and one of the things I do besides the resizing is a crop > to make the thumbnail square, a la Flickr. > Setting the JPG compression would be another use for this pre-processing. > More fancy ImageMagick processing could also be easily integrated... > > Anyway... just throwing some ideas around. ;-) > > On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi there, > > > > I''m happy to announce a new minor release of file_column. It contains > > two small fixes. > > > > * You can now serialize objects that have a file_column again, which > > is important if you want to store these objects into the flash or the > > session. > > > > * If you want to use the RMagick integration and you''ve installed > > RMagick yourself (instead of as a gem) it should work right out of the > > box. > > > > > > Apart from these fixes, the plugin is finally available at a public > > svn repository, so that you can use the cool new plugin script, rails > > features in its latest release candidate. The repository is at: > > > > https://opensvn.csie.org/rails_file_column/plugins/file_column/ > > > > Installation is as easy as typing > > > > ./script/plugin install > > https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > > > > (you can still get an archive at > > http://www.kanthak.net/opensource/file_column/) > > > > in your project''s directory. Warning: The trunk can be unstable. You > > can find stable releases in the tags directory. Is there a standard > > way of telling the plugin script about which version to use? I''m a bit > > confused here, because the standard layout of plugin repositories does > > not seem to contain the standard tags or branches directories. Can > > somebody educate me about the repository conventions for plugins? How > > do you make sure as a plugin developer, that your users only use > > stable versions by default? > > > > > > On a different note, I need some input on the future directions of > > file_column, so that it suits your needs as well as possible. I have > > already discussed some of these ideas with Kyle Maxwell. Thanks a lot > > for your input, Kyle! > > > > Basically I want to keep file_column as lean and general as possible, > > while providing some more features that have been requested often and > > making it easy for you to implement your more exotic needs. So here > > are two points, where I''d be happy about feedback: > > > > * Right now, I''m using the RMagick library to use the imagemagick > > toolkit. Is it hard to get this working under Windows? Would you > > prefer file_column calling the imagemagick commands directly? I''d like > > to keep the dependency on the RMagick library as it allows for much > > more beautiful code and easier handling of images. > > > > * The versions feature allows you to declare in the model, that > > several different sizes of an image should be stored that can > > subsequently be accessed from your view. Kyle and I feel that this > > information doesn''t really belong into the model, so Kyle suggested > > that you can specify a geometry string in the view''s > > url_for_file_column method. If an image does not exist in these > > dimensions already, it will be created transparently and stored so > > that it can be used again in the next request. > > > > What do you think about this feature? Does it make sense? Should it > > replace the declaration of versions in the model completely or should > > it be an additional feature? > > > > > > Thanks for all the encouranging feedback I have received so far! > > > > Sebastian > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > CrisDias, o Síndico > www.vilago.com.br -- Seu site vai gostar de morar aqui > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
If anyone''s curious, they can check out my branch (
http://opensvn.csie.org/rails_file_column/plugins/file_column/branches/kyle/
), which includes the following changes:
Changes:
- Removed the "versions" implementation.
- Removed RMagick dependency
- Complete rewrite of Imagemagick functionality.  It uses
IO.popen("mogrify ...").
- Added url_for_file_column "model", "field", :magick =>
command_options.  You can pass command options as a string or
a hash:("-resize 100x100" or :resize => "100x100")
- Added validates_extension_of(*attr_names).  This takes either a
string or an array of extensions.  It validates that the file has one
of the extensions listed.  If it doesn''t it tries to convert the file
to the first extension in the list using imagemagick.  If that fails,
then it adds a validation error to the model.
Todo:
- Merge the 0.3.1 updates.
- Add more tests
- Add better support for multi-environment use.  In addition to the
production vs development, multilingual concerns have come up.  I''m
using the multilingual plugin, and I might need to grab a different
version of a file for each locale.  How to make this easy without
increasing overall complexity?
On 11/16/05, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> my guess is that you''d pass a :crop argument just like you can
with :geometry?
> I''m assuming (haven''t tested it yet) that all imagemagick
commands are
> accessible this way:
> http://www.imagemagick.org/script/command-line-options.php#crop
>
> 2005/11/15, Kyle Heon
<kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:
> > Yeah, I too would definetly like to have a way to crop the photo being
> > uploaded in an effort to consistently make square thumbnails.
> >
> > I''d be interested to see how others are doing this currently
while using
> > FileColumn.
> >
> > Many thanks for FileColumn, it''s a huge time saver.
> >
> > Kyle Heon
> > kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
> >
> >
> > -----Original Message-----
> > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> >
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Cristiano Dias
> > Sent: Tuesday, November 15, 2005 8:05 PM
> > To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org;
rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository
> >
> > Hi there,
> >
> > First of all thank you very much for this excellent plugin.
> >
> > Answering your questions... yes, I run RMagick in Windows and it is a
> > @#*^#@*&# pain. Right now it just doesn''t work,
I''m still trying to figure
> > out which upgrade broke it. But it is not your fault. :-(
> >
> > Now the request... 8-) One feature I could really use is something
like a
> > before_filter... I made a "poor man''s Flickr" for
my wedding pictures (not
> > using file_column) and one of the things I do besides the resizing is
a crop
> > to make the thumbnail square, a la Flickr.
> > Setting the JPG compression would be another use for this
pre-processing.
> > More fancy ImageMagick processing could also be easily integrated...
> >
> > Anyway... just throwing some ideas around. ;-)
> >
> > On 11/14/05, Sebastian Kanthak
<skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > Hi there,
> > >
> > > I''m happy to announce a new minor release of
file_column. It contains
> > > two small fixes.
> > >
> > > * You can now serialize objects that have a file_column again,
which
> > > is important if you want to store these objects into the flash or
the
> > > session.
> > >
> > > * If you want to use the RMagick integration and you''ve
installed
> > > RMagick yourself (instead of as a gem) it should work right out
of the
> > > box.
> > >
> > >
> > > Apart from these fixes, the plugin is finally available at a
public
> > > svn repository, so that you can use the cool new plugin script,
rails
> > > features in its latest release candidate. The repository is at:
> > >
> > > https://opensvn.csie.org/rails_file_column/plugins/file_column/
> > >
> > > Installation is as easy as typing
> > >
> > > ./script/plugin install
> > >
https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
> > >
> > > (you can still get an archive at
> > > http://www.kanthak.net/opensource/file_column/)
> > >
> > > in your project''s directory. Warning: The trunk can be
unstable. You
> > > can find stable releases in the tags directory. Is there a
standard
> > > way of telling the plugin script about which version to use?
I''m a bit
> > > confused here, because the standard layout of plugin repositories
does
> > > not seem to contain the standard tags or branches directories.
Can
> > > somebody educate me about the repository conventions for plugins?
How
> > > do you make sure as a plugin developer, that your users only use
> > > stable versions by default?
> > >
> > >
> > > On a different note, I need some input on the future directions
of
> > > file_column, so that it suits your needs as well as possible. I
have
> > > already discussed some of these ideas with Kyle Maxwell. Thanks a
lot
> > > for your input, Kyle!
> > >
> > > Basically I want to keep file_column as lean and general as
possible,
> > > while providing some more features that have been requested often
and
> > > making it easy for you to implement your more exotic needs. So
here
> > > are two points, where I''d be happy about feedback:
> > >
> > > * Right now, I''m using the RMagick library to use the
imagemagick
> > > toolkit. Is it hard to get this working under Windows? Would you
> > > prefer file_column calling the imagemagick commands directly?
I''d like
> > > to keep the dependency on the RMagick library as it allows for
much
> > > more beautiful code and easier handling of images.
> > >
> > > * The versions feature allows you to declare in the model, that
> > > several different sizes of an image should be stored that can
> > > subsequently be accessed from your view. Kyle and I feel that
this
> > > information doesn''t really belong into the model, so
Kyle suggested
> > > that you can specify a geometry string in the view''s
> > > url_for_file_column method. If an image does not exist in these
> > > dimensions already, it will be created transparently and stored
so
> > > that it can be used again in the next request.
> > >
> > > What do you think about this feature? Does it make sense? Should
it
> > > replace the declaration of versions in the model completely or
should
> > > it be an additional feature?
> > >
> > >
> > > Thanks for all the encouranging feedback I have received so far!
> > >
> > > Sebastian
> > > _______________________________________________
> > > Rails mailing list
> > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > >
> >
> >
> > --
> > CrisDias, o Síndico
> > www.vilago.com.br -- Seu site vai gostar de morar aqui
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
actually, I think I may have guessed wrong. I just had a look at magick_file_column.rb, from what I could make out of the code (my knowledgeg of ruby is limited), it seems only resizing is working right now... 2005/11/16, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> my guess is that you''d pass a :crop argument just like you can with :geometry? > I''m assuming (haven''t tested it yet) that all imagemagick commands are > accessible this way: > http://www.imagemagick.org/script/command-line-options.php#crop > > 2005/11/15, Kyle Heon <kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>: > > Yeah, I too would definetly like to have a way to crop the photo being > > uploaded in an effort to consistently make square thumbnails. > > > > I''d be interested to see how others are doing this currently while using > > FileColumn. > > > > Many thanks for FileColumn, it''s a huge time saver. > > > > Kyle Heon > > kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org > > > > > > -----Original Message----- > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cristiano Dias > > Sent: Tuesday, November 15, 2005 8:05 PM > > To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > > > > Hi there, > > > > First of all thank you very much for this excellent plugin. > > > > Answering your questions... yes, I run RMagick in Windows and it is a > > @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure > > out which upgrade broke it. But it is not your fault. :-( > > > > Now the request... 8-) One feature I could really use is something like a > > before_filter... I made a "poor man''s Flickr" for my wedding pictures (not > > using file_column) and one of the things I do besides the resizing is a crop > > to make the thumbnail square, a la Flickr. > > Setting the JPG compression would be another use for this pre-processing. > > More fancy ImageMagick processing could also be easily integrated... > > > > Anyway... just throwing some ideas around. ;-) > > > > On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi there, > > > > > > I''m happy to announce a new minor release of file_column. It contains > > > two small fixes. > > > > > > * You can now serialize objects that have a file_column again, which > > > is important if you want to store these objects into the flash or the > > > session. > > > > > > * If you want to use the RMagick integration and you''ve installed > > > RMagick yourself (instead of as a gem) it should work right out of the > > > box. > > > > > > > > > Apart from these fixes, the plugin is finally available at a public > > > svn repository, so that you can use the cool new plugin script, rails > > > features in its latest release candidate. The repository is at: > > > > > > https://opensvn.csie.org/rails_file_column/plugins/file_column/ > > > > > > Installation is as easy as typing > > > > > > ./script/plugin install > > > https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > > > > > > (you can still get an archive at > > > http://www.kanthak.net/opensource/file_column/) > > > > > > in your project''s directory. Warning: The trunk can be unstable. You > > > can find stable releases in the tags directory. Is there a standard > > > way of telling the plugin script about which version to use? I''m a bit > > > confused here, because the standard layout of plugin repositories does > > > not seem to contain the standard tags or branches directories. Can > > > somebody educate me about the repository conventions for plugins? How > > > do you make sure as a plugin developer, that your users only use > > > stable versions by default? > > > > > > > > > On a different note, I need some input on the future directions of > > > file_column, so that it suits your needs as well as possible. I have > > > already discussed some of these ideas with Kyle Maxwell. Thanks a lot > > > for your input, Kyle! > > > > > > Basically I want to keep file_column as lean and general as possible, > > > while providing some more features that have been requested often and > > > making it easy for you to implement your more exotic needs. So here > > > are two points, where I''d be happy about feedback: > > > > > > * Right now, I''m using the RMagick library to use the imagemagick > > > toolkit. Is it hard to get this working under Windows? Would you > > > prefer file_column calling the imagemagick commands directly? I''d like > > > to keep the dependency on the RMagick library as it allows for much > > > more beautiful code and easier handling of images. > > > > > > * The versions feature allows you to declare in the model, that > > > several different sizes of an image should be stored that can > > > subsequently be accessed from your view. Kyle and I feel that this > > > information doesn''t really belong into the model, so Kyle suggested > > > that you can specify a geometry string in the view''s > > > url_for_file_column method. If an image does not exist in these > > > dimensions already, it will be created transparently and stored so > > > that it can be used again in the next request. > > > > > > What do you think about this feature? Does it make sense? Should it > > > replace the declaration of versions in the model completely or should > > > it be an additional feature? > > > > > > > > > Thanks for all the encouranging feedback I have received so far! > > > > > > Sebastian > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > > CrisDias, o Síndico > > www.vilago.com.br -- Seu site vai gostar de morar aqui > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
0.3.0 only supported the :geometry option, and that should be true of 0.3.1. Try my branch for generic imagemagick capabilities. You can pass any of the command line options, but remember that my branch is experimental (although I use it in my production sites), and that imagemagick transformations are handled in the view (url_for_file_column). On 11/16/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> actually, I think I may have guessed wrong. I just had a look at > magick_file_column.rb, from what I could make out of the code (my > knowledgeg of ruby is limited), it seems only resizing is working > right now... > > 2005/11/16, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > my guess is that you''d pass a :crop argument just like you can with :geometry? > > I''m assuming (haven''t tested it yet) that all imagemagick commands are > > accessible this way: > > http://www.imagemagick.org/script/command-line-options.php#crop > > > > 2005/11/15, Kyle Heon <kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>: > > > Yeah, I too would definetly like to have a way to crop the photo being > > > uploaded in an effort to consistently make square thumbnails. > > > > > > I''d be interested to see how others are doing this currently while using > > > FileColumn. > > > > > > Many thanks for FileColumn, it''s a huge time saver. > > > > > > Kyle Heon > > > kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org > > > > > > > > > -----Original Message----- > > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cristiano Dias > > > Sent: Tuesday, November 15, 2005 8:05 PM > > > To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > > > > > > Hi there, > > > > > > First of all thank you very much for this excellent plugin. > > > > > > Answering your questions... yes, I run RMagick in Windows and it is a > > > @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure > > > out which upgrade broke it. But it is not your fault. :-( > > > > > > Now the request... 8-) One feature I could really use is something like a > > > before_filter... I made a "poor man''s Flickr" for my wedding pictures (not > > > using file_column) and one of the things I do besides the resizing is a crop > > > to make the thumbnail square, a la Flickr. > > > Setting the JPG compression would be another use for this pre-processing. > > > More fancy ImageMagick processing could also be easily integrated... > > > > > > Anyway... just throwing some ideas around. ;-) > > > > > > On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi there, > > > > > > > > I''m happy to announce a new minor release of file_column. It contains > > > > two small fixes. > > > > > > > > * You can now serialize objects that have a file_column again, which > > > > is important if you want to store these objects into the flash or the > > > > session. > > > > > > > > * If you want to use the RMagick integration and you''ve installed > > > > RMagick yourself (instead of as a gem) it should work right out of the > > > > box. > > > > > > > > > > > > Apart from these fixes, the plugin is finally available at a public > > > > svn repository, so that you can use the cool new plugin script, rails > > > > features in its latest release candidate. The repository is at: > > > > > > > > https://opensvn.csie.org/rails_file_column/plugins/file_column/ > > > > > > > > Installation is as easy as typing > > > > > > > > ./script/plugin install > > > > https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > > > > > > > > (you can still get an archive at > > > > http://www.kanthak.net/opensource/file_column/) > > > > > > > > in your project''s directory. Warning: The trunk can be unstable. You > > > > can find stable releases in the tags directory. Is there a standard > > > > way of telling the plugin script about which version to use? I''m a bit > > > > confused here, because the standard layout of plugin repositories does > > > > not seem to contain the standard tags or branches directories. Can > > > > somebody educate me about the repository conventions for plugins? How > > > > do you make sure as a plugin developer, that your users only use > > > > stable versions by default? > > > > > > > > > > > > On a different note, I need some input on the future directions of > > > > file_column, so that it suits your needs as well as possible. I have > > > > already discussed some of these ideas with Kyle Maxwell. Thanks a lot > > > > for your input, Kyle! > > > > > > > > Basically I want to keep file_column as lean and general as possible, > > > > while providing some more features that have been requested often and > > > > making it easy for you to implement your more exotic needs. So here > > > > are two points, where I''d be happy about feedback: > > > > > > > > * Right now, I''m using the RMagick library to use the imagemagick > > > > toolkit. Is it hard to get this working under Windows? Would you > > > > prefer file_column calling the imagemagick commands directly? I''d like > > > > to keep the dependency on the RMagick library as it allows for much > > > > more beautiful code and easier handling of images. > > > > > > > > * The versions feature allows you to declare in the model, that > > > > several different sizes of an image should be stored that can > > > > subsequently be accessed from your view. Kyle and I feel that this > > > > information doesn''t really belong into the model, so Kyle suggested > > > > that you can specify a geometry string in the view''s > > > > url_for_file_column method. If an image does not exist in these > > > > dimensions already, it will be created transparently and stored so > > > > that it can be used again in the next request. > > > > > > > > What do you think about this feature? Does it make sense? Should it > > > > replace the declaration of versions in the model completely or should > > > > it be an additional feature? > > > > > > > > > > > > Thanks for all the encouranging feedback I have received so far! > > > > > > > > Sebastian > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > -- > > > CrisDias, o Síndico > > > www.vilago.com.br -- Seu site vai gostar de morar aqui > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Kyle, Interesting work. Does your branch save the results of the transformations so they don''t need to be run each time they are displayed (i.e. Changing the size only creates a new file the first time and subsequent requests pull up that file)? Hunter> From: Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> > Reply-To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Date: Wed, 16 Nov 2005 09:29:59 -0800 > To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > > 0.3.0 only supported the :geometry option, and that should be true of > 0.3.1. Try my branch for generic imagemagick capabilities. You can > pass any of the command line options, but remember that my branch is > experimental (although I use it in my production sites), and that > imagemagick transformations are handled in the view > (url_for_file_column). > > On 11/16/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> actually, I think I may have guessed wrong. I just had a look at >> magick_file_column.rb, from what I could make out of the code (my >> knowledgeg of ruby is limited), it seems only resizing is working >> right now... >> >> 2005/11/16, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >>> my guess is that you''d pass a :crop argument just like you can with >>> :geometry? >>> I''m assuming (haven''t tested it yet) that all imagemagick commands are >>> accessible this way: >>> http://www.imagemagick.org/script/command-line-options.php#crop >>> >>> 2005/11/15, Kyle Heon <kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>: >>>> Yeah, I too would definetly like to have a way to crop the photo being >>>> uploaded in an effort to consistently make square thumbnails. >>>> >>>> I''d be interested to see how others are doing this currently while using >>>> FileColumn. >>>> >>>> Many thanks for FileColumn, it''s a huge time saver. >>>> >>>> Kyle Heon >>>> kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org >>>> >>>> >>>> -----Original Message----- >>>> From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cristiano Dias >>>> Sent: Tuesday, November 15, 2005 8:05 PM >>>> To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository >>>> >>>> Hi there, >>>> >>>> First of all thank you very much for this excellent plugin. >>>> >>>> Answering your questions... yes, I run RMagick in Windows and it is a >>>> @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure >>>> out which upgrade broke it. But it is not your fault. :-( >>>> >>>> Now the request... 8-) One feature I could really use is something like a >>>> before_filter... I made a "poor man''s Flickr" for my wedding pictures (not >>>> using file_column) and one of the things I do besides the resizing is a >>>> crop >>>> to make the thumbnail square, a la Flickr. >>>> Setting the JPG compression would be another use for this pre-processing. >>>> More fancy ImageMagick processing could also be easily integrated... >>>> >>>> Anyway... just throwing some ideas around. ;-) >>>> >>>> On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>> Hi there, >>>>> >>>>> I''m happy to announce a new minor release of file_column. It contains >>>>> two small fixes. >>>>> >>>>> * You can now serialize objects that have a file_column again, which >>>>> is important if you want to store these objects into the flash or the >>>>> session. >>>>> >>>>> * If you want to use the RMagick integration and you''ve installed >>>>> RMagick yourself (instead of as a gem) it should work right out of the >>>>> box. >>>>> >>>>> >>>>> Apart from these fixes, the plugin is finally available at a public >>>>> svn repository, so that you can use the cool new plugin script, rails >>>>> features in its latest release candidate. The repository is at: >>>>> >>>>> https://opensvn.csie.org/rails_file_column/plugins/file_column/ >>>>> >>>>> Installation is as easy as typing >>>>> >>>>> ./script/plugin install >>>>> https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk >>>>> >>>>> (you can still get an archive at >>>>> http://www.kanthak.net/opensource/file_column/) >>>>> >>>>> in your project''s directory. Warning: The trunk can be unstable. You >>>>> can find stable releases in the tags directory. Is there a standard >>>>> way of telling the plugin script about which version to use? I''m a bit >>>>> confused here, because the standard layout of plugin repositories does >>>>> not seem to contain the standard tags or branches directories. Can >>>>> somebody educate me about the repository conventions for plugins? How >>>>> do you make sure as a plugin developer, that your users only use >>>>> stable versions by default? >>>>> >>>>> >>>>> On a different note, I need some input on the future directions of >>>>> file_column, so that it suits your needs as well as possible. I have >>>>> already discussed some of these ideas with Kyle Maxwell. Thanks a lot >>>>> for your input, Kyle! >>>>> >>>>> Basically I want to keep file_column as lean and general as possible, >>>>> while providing some more features that have been requested often and >>>>> making it easy for you to implement your more exotic needs. So here >>>>> are two points, where I''d be happy about feedback: >>>>> >>>>> * Right now, I''m using the RMagick library to use the imagemagick >>>>> toolkit. Is it hard to get this working under Windows? Would you >>>>> prefer file_column calling the imagemagick commands directly? I''d like >>>>> to keep the dependency on the RMagick library as it allows for much >>>>> more beautiful code and easier handling of images. >>>>> >>>>> * The versions feature allows you to declare in the model, that >>>>> several different sizes of an image should be stored that can >>>>> subsequently be accessed from your view. Kyle and I feel that this >>>>> information doesn''t really belong into the model, so Kyle suggested >>>>> that you can specify a geometry string in the view''s >>>>> url_for_file_column method. If an image does not exist in these >>>>> dimensions already, it will be created transparently and stored so >>>>> that it can be used again in the next request. >>>>> >>>>> What do you think about this feature? Does it make sense? Should it >>>>> replace the declaration of versions in the model completely or should >>>>> it be an additional feature? >>>>> >>>>> >>>>> Thanks for all the encouranging feedback I have received so far! >>>>> >>>>> Sebastian >>>>> _______________________________________________ >>>>> Rails mailing list >>>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>>> >>>> >>>> >>>> -- >>>> CrisDias, o Síndico >>>> www.vilago.com.br -- Seu site vai gostar de morar aqui >>>> _______________________________________________ >>>> Rails mailing list >>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>> >>>> _______________________________________________ >>>> Rails mailing list >>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>> >>> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
It would be great if you could set prefered image formats along with resizes - smaller files usually look better in png or gif but with larger files jpeg has a better quality/size ratio. I reckon Rmagick has no ''convert'' method per se (it converts formats on-the-fly when a file is saved with a different extension) that''s the main reason I''m going to tamper with the code for file_column a bit.. spe. On 11/16/05, Hunter Hillegas <lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf@public.gmane.org> wrote:> Kyle, > > Interesting work. > > Does your branch save the results of the transformations so they don''t need > to be run each time they are displayed (i.e. Changing the size only creates > a new file the first time and subsequent requests pull up that file)? > > Hunter > > > From: Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> > > Reply-To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > > Date: Wed, 16 Nov 2005 09:29:59 -0800 > > To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > > > > 0.3.0 only supported the :geometry option, and that should be true of > > 0.3.1. Try my branch for generic imagemagick capabilities. You can > > pass any of the command line options, but remember that my branch is > > experimental (although I use it in my production sites), and that > > imagemagick transformations are handled in the view > > (url_for_file_column). > > > > On 11/16/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> actually, I think I may have guessed wrong. I just had a look at > >> magick_file_column.rb, from what I could make out of the code (my > >> knowledgeg of ruby is limited), it seems only resizing is working > >> right now... > >> > >> 2005/11/16, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > >>> my guess is that you''d pass a :crop argument just like you can with > >>> :geometry? > >>> I''m assuming (haven''t tested it yet) that all imagemagick commands are > >>> accessible this way: > >>> http://www.imagemagick.org/script/command-line-options.php#crop > >>> > >>> 2005/11/15, Kyle Heon <kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>: > >>>> Yeah, I too would definetly like to have a way to crop the photo being > >>>> uploaded in an effort to consistently make square thumbnails. > >>>> > >>>> I''d be interested to see how others are doing this currently while using > >>>> FileColumn. > >>>> > >>>> Many thanks for FileColumn, it''s a huge time saver. > >>>> > >>>> Kyle Heon > >>>> kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org > >>>> > >>>> > >>>> -----Original Message----- > >>>> From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>> [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cristiano Dias > >>>> Sent: Tuesday, November 15, 2005 8:05 PM > >>>> To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>> Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > >>>> > >>>> Hi there, > >>>> > >>>> First of all thank you very much for this excellent plugin. > >>>> > >>>> Answering your questions... yes, I run RMagick in Windows and it is a > >>>> @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure > >>>> out which upgrade broke it. But it is not your fault. :-( > >>>> > >>>> Now the request... 8-) One feature I could really use is something like a > >>>> before_filter... I made a "poor man''s Flickr" for my wedding pictures (not > >>>> using file_column) and one of the things I do besides the resizing is a > >>>> crop > >>>> to make the thumbnail square, a la Flickr. > >>>> Setting the JPG compression would be another use for this pre-processing. > >>>> More fancy ImageMagick processing could also be easily integrated... > >>>> > >>>> Anyway... just throwing some ideas around. ;-) > >>>> > >>>> On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>>> Hi there, > >>>>> > >>>>> I''m happy to announce a new minor release of file_column. It contains > >>>>> two small fixes. > >>>>> > >>>>> * You can now serialize objects that have a file_column again, which > >>>>> is important if you want to store these objects into the flash or the > >>>>> session. > >>>>> > >>>>> * If you want to use the RMagick integration and you''ve installed > >>>>> RMagick yourself (instead of as a gem) it should work right out of the > >>>>> box. > >>>>> > >>>>> > >>>>> Apart from these fixes, the plugin is finally available at a public > >>>>> svn repository, so that you can use the cool new plugin script, rails > >>>>> features in its latest release candidate. The repository is at: > >>>>> > >>>>> https://opensvn.csie.org/rails_file_column/plugins/file_column/ > >>>>> > >>>>> Installation is as easy as typing > >>>>> > >>>>> ./script/plugin install > >>>>> https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > >>>>> > >>>>> (you can still get an archive at > >>>>> http://www.kanthak.net/opensource/file_column/) > >>>>> > >>>>> in your project''s directory. Warning: The trunk can be unstable. You > >>>>> can find stable releases in the tags directory. Is there a standard > >>>>> way of telling the plugin script about which version to use? I''m a bit > >>>>> confused here, because the standard layout of plugin repositories does > >>>>> not seem to contain the standard tags or branches directories. Can > >>>>> somebody educate me about the repository conventions for plugins? How > >>>>> do you make sure as a plugin developer, that your users only use > >>>>> stable versions by default? > >>>>> > >>>>> > >>>>> On a different note, I need some input on the future directions of > >>>>> file_column, so that it suits your needs as well as possible. I have > >>>>> already discussed some of these ideas with Kyle Maxwell. Thanks a lot > >>>>> for your input, Kyle! > >>>>> > >>>>> Basically I want to keep file_column as lean and general as possible, > >>>>> while providing some more features that have been requested often and > >>>>> making it easy for you to implement your more exotic needs. So here > >>>>> are two points, where I''d be happy about feedback: > >>>>> > >>>>> * Right now, I''m using the RMagick library to use the imagemagick > >>>>> toolkit. Is it hard to get this working under Windows? Would you > >>>>> prefer file_column calling the imagemagick commands directly? I''d like > >>>>> to keep the dependency on the RMagick library as it allows for much > >>>>> more beautiful code and easier handling of images. > >>>>> > >>>>> * The versions feature allows you to declare in the model, that > >>>>> several different sizes of an image should be stored that can > >>>>> subsequently be accessed from your view. Kyle and I feel that this > >>>>> information doesn''t really belong into the model, so Kyle suggested > >>>>> that you can specify a geometry string in the view''s > >>>>> url_for_file_column method. If an image does not exist in these > >>>>> dimensions already, it will be created transparently and stored so > >>>>> that it can be used again in the next request. > >>>>> > >>>>> What do you think about this feature? Does it make sense? Should it > >>>>> replace the declaration of versions in the model completely or should > >>>>> it be an additional feature? > >>>>> > >>>>> > >>>>> Thanks for all the encouranging feedback I have received so far! > >>>>> > >>>>> Sebastian > >>>>> _______________________________________________ > >>>>> Rails mailing list > >>>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>>> http://lists.rubyonrails.org/mailman/listinfo/rails > >>>>> > >>>> > >>>> > >>>> -- > >>>> CrisDias, o Síndico > >>>> www.vilago.com.br -- Seu site vai gostar de morar aqui > >>>> _______________________________________________ > >>>> Rails mailing list > >>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>> http://lists.rubyonrails.org/mailman/listinfo/rails > >>>> > >>>> _______________________________________________ > >>>> Rails mailing list > >>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>> http://lists.rubyonrails.org/mailman/listinfo/rails > >>>> > >>> > >> _______________________________________________ > >> Rails mailing list > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
If you use my branch, assuming png support is compiled into
imagemagick, you can:
url_for_file_column "model", "field", :magick => {:format
=>"png",
:resize => "10x10"}
Alternately:
url_for_file_column "model", "field", :magick =>
"-format png -resize 10x10"
On 11/16/05, Spiceee <spiceee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> It would be great if you could set prefered image formats along with
> resizes - smaller files usually look better in png or gif but with
> larger files jpeg has a better quality/size ratio.
>
> I reckon Rmagick has no ''convert'' method per se (it
converts formats
> on-the-fly when a file is saved with a different extension) that''s
the
> main reason I''m going to tamper with the code for file_column a
bit..
>
> spe.
>
>
> On 11/16/05, Hunter Hillegas
<lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf@public.gmane.org> wrote:
> > Kyle,
> >
> > Interesting work.
> >
> > Does your branch save the results of the transformations so they
don''t need
> > to be run each time they are displayed (i.e. Changing the size only
creates
> > a new file the first time and subsequent requests pull up that file)?
> >
> > Hunter
> >
> > > From: Kyle Maxwell
<kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>
> > > Reply-To:
<rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> > > Date: Wed, 16 Nov 2005 09:29:59 -0800
> > > To:
<rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository
> > >
> > > 0.3.0 only supported the :geometry option, and that should be
true of
> > > 0.3.1.  Try my branch for generic imagemagick capabilities.  You
can
> > > pass any of the command line options, but remember that my branch
is
> > > experimental (although I use it in my production sites), and that
> > > imagemagick transformations are handled in the view
> > > (url_for_file_column).
> > >
> > > On 11/16/05, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > >> actually, I think I may have guessed wrong. I just had a look
at
> > >> magick_file_column.rb, from what I could make out of the code
(my
> > >> knowledgeg of ruby is limited), it seems only resizing is
working
> > >> right now...
> > >>
> > >> 2005/11/16, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> > >>> my guess is that you''d pass a :crop argument
just like you can with
> > >>> :geometry?
> > >>> I''m assuming (haven''t tested it yet)
that all imagemagick commands are
> > >>> accessible this way:
> > >>>
http://www.imagemagick.org/script/command-line-options.php#crop
> > >>>
> > >>> 2005/11/15, Kyle Heon
<kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:
> > >>>> Yeah, I too would definetly like to have a way to
crop the photo being
> > >>>> uploaded in an effort to consistently make square
thumbnails.
> > >>>>
> > >>>> I''d be interested to see how others are
doing this currently while using
> > >>>> FileColumn.
> > >>>>
> > >>>> Many thanks for FileColumn, it''s a huge time
saver.
> > >>>>
> > >>>> Kyle Heon
> > >>>> kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
> > >>>>
> > >>>>
> > >>>> -----Original Message-----
> > >>>> From:
rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>>
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Cristiano Dias
> > >>>> Sent: Tuesday, November 15, 2005 8:05 PM
> > >>>> To:
sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org;
rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>> Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN
repository
> > >>>>
> > >>>> Hi there,
> > >>>>
> > >>>> First of all thank you very much for this excellent
plugin.
> > >>>>
> > >>>> Answering your questions... yes, I run RMagick in
Windows and it is a
> > >>>> @#*^#@*&# pain. Right now it just
doesn''t work, I''m still trying to figure
> > >>>> out which upgrade broke it. But it is not your fault.
:-(
> > >>>>
> > >>>> Now the request... 8-) One feature I could really use
is something like a
> > >>>> before_filter... I made a "poor man''s
Flickr" for my wedding pictures (not
> > >>>> using file_column) and one of the things I do besides
the resizing is a
> > >>>> crop
> > >>>> to make the thumbnail square, a la Flickr.
> > >>>> Setting the JPG compression would be another use for
this pre-processing.
> > >>>> More fancy ImageMagick processing could also be
easily integrated...
> > >>>>
> > >>>> Anyway... just throwing some ideas around. ;-)
> > >>>>
> > >>>> On 11/14/05, Sebastian Kanthak
<skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > >>>>> Hi there,
> > >>>>>
> > >>>>> I''m happy to announce a new minor
release of file_column. It contains
> > >>>>> two small fixes.
> > >>>>>
> > >>>>> * You can now serialize objects that have a
file_column again, which
> > >>>>> is important if you want to store these objects
into the flash or the
> > >>>>> session.
> > >>>>>
> > >>>>> * If you want to use the RMagick integration and
you''ve installed
> > >>>>> RMagick yourself (instead of as a gem) it should
work right out of the
> > >>>>> box.
> > >>>>>
> > >>>>>
> > >>>>> Apart from these fixes, the plugin is finally
available at a public
> > >>>>> svn repository, so that you can use the cool new
plugin script, rails
> > >>>>> features in its latest release candidate. The
repository is at:
> > >>>>>
> > >>>>>
https://opensvn.csie.org/rails_file_column/plugins/file_column/
> > >>>>>
> > >>>>> Installation is as easy as typing
> > >>>>>
> > >>>>> ./script/plugin install
> > >>>>>
https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
> > >>>>>
> > >>>>> (you can still get an archive at
> > >>>>> http://www.kanthak.net/opensource/file_column/)
> > >>>>>
> > >>>>> in your project''s directory. Warning:
The trunk can be unstable. You
> > >>>>> can find stable releases in the tags directory.
Is there a standard
> > >>>>> way of telling the plugin script about which
version to use? I''m a bit
> > >>>>> confused here, because the standard layout of
plugin repositories does
> > >>>>> not seem to contain the standard tags or branches
directories. Can
> > >>>>> somebody educate me about the repository
conventions for plugins? How
> > >>>>> do you make sure as a plugin developer, that your
users only use
> > >>>>> stable versions by default?
> > >>>>>
> > >>>>>
> > >>>>> On a different note, I need some input on the
future directions of
> > >>>>> file_column, so that it suits your needs as well
as possible. I have
> > >>>>> already discussed some of these ideas with Kyle
Maxwell. Thanks a lot
> > >>>>> for your input, Kyle!
> > >>>>>
> > >>>>> Basically I want to keep file_column as lean and
general as possible,
> > >>>>> while providing some more features that have been
requested often and
> > >>>>> making it easy for you to implement your more
exotic needs. So here
> > >>>>> are two points, where I''d be happy about
feedback:
> > >>>>>
> > >>>>> * Right now, I''m using the RMagick
library to use the imagemagick
> > >>>>> toolkit. Is it hard to get this working under
Windows? Would you
> > >>>>> prefer file_column calling the imagemagick
commands directly? I''d like
> > >>>>> to keep the dependency on the RMagick library as
it allows for much
> > >>>>> more beautiful code and easier handling of
images.
> > >>>>>
> > >>>>> * The versions feature allows you to declare in
the model, that
> > >>>>> several different sizes of an image should be
stored that can
> > >>>>> subsequently be accessed from your view. Kyle and
I feel that this
> > >>>>> information doesn''t really belong into
the model, so Kyle suggested
> > >>>>> that you can specify a geometry string in the
view''s
> > >>>>> url_for_file_column method. If an image does not
exist in these
> > >>>>> dimensions already, it will be created
transparently and stored so
> > >>>>> that it can be used again in the next request.
> > >>>>>
> > >>>>> What do you think about this feature? Does it
make sense? Should it
> > >>>>> replace the declaration of versions in the model
completely or should
> > >>>>> it be an additional feature?
> > >>>>>
> > >>>>>
> > >>>>> Thanks for all the encouranging feedback I have
received so far!
> > >>>>>
> > >>>>> Sebastian
> > >>>>> _______________________________________________
> > >>>>> Rails mailing list
> > >>>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>>>
http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>>>>
> > >>>>
> > >>>>
> > >>>> --
> > >>>> CrisDias, o Síndico
> > >>>> www.vilago.com.br -- Seu site vai gostar de morar
aqui
> > >>>> _______________________________________________
> > >>>> Rails mailing list
> > >>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>> http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>>>
> > >>>> _______________________________________________
> > >>>> Rails mailing list
> > >>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>> http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>>>
> > >>>
> > >> _______________________________________________
> > >> Rails mailing list
> > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >> http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>
> > > _______________________________________________
> > > Rails mailing list
> > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> >
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
cool, i''ll give it a try! spe. On 11/16/05, Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> wrote:> If you use my branch, assuming png support is compiled into > imagemagick, you can: > > url_for_file_column "model", "field", :magick => {:format =>"png", > :resize => "10x10"} > > Alternately: > > url_for_file_column "model", "field", :magick => "-format png -resize 10x10" >
Sebastian Kanthak wrote:>Hi there, > >I''m happy to announce a new minor release of file_column. It contains >two small fixes. > >Please correct me if I''m wrong, but a little playing with file_column tells me that the file name is being stored in the file_column and it will be retrieved for display from the saved place from the /public folder. Is there a way I can save the *image itself* in the file column (that was my original assumption). Which approach is better? Saving images/files in the database or a regular file system? TIA, Vamsee.
On 11/17/05, Vamsee Kanakala <vamlists-hi6Y0CQ0nG0@public.gmane.org> wrote:> Please correct me if I''m wrong, but a little playing with file_column > tells me that the file name is being stored in the file_column and it > will be retrieved for display from the saved place from the /public > folder. Is there a way I can save the *image itself* in the file column > (that was my original assumption). Which approach is better? Saving > images/files in the database or a regular file system?you''re right, the file itself is stored in the filesystem. I believe this is better (and in this sense, file_column is oppinionated software), because rails'' handling of binary data in the database isn''t very efficient and there is no real reason to put it in the database anyways. In short, file systems should be pretty good at storing files... :) Sebastian
hi kyle,
I installed your branch and am getting the following error when booting webrick:
(from locomotive) dependencies.rb:200:in `const_missing'':
uninitialized constant BaseUploadedFile (NameError)
        from
./script/../config/../vendor/plugins/kyle/lib/magick_file_column.rb:2
though I can see the BaseUploadedFile class in file_column.rb.
thanks
Oliver
2005/11/16, Kyle Maxwell
<kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>:> If anyone''s curious, they can check out my branch (
>
http://opensvn.csie.org/rails_file_column/plugins/file_column/branches/kyle/
> ), which includes the following changes:
>
> Changes:
> - Removed the "versions" implementation.
> - Removed RMagick dependency
> - Complete rewrite of Imagemagick functionality.  It uses
> IO.popen("mogrify ...").
> - Added url_for_file_column "model", "field", :magick
=>
> command_options.  You can pass command options as a string or
> a hash:("-resize 100x100" or :resize => "100x100")
> - Added validates_extension_of(*attr_names).  This takes either a
> string or an array of extensions.  It validates that the file has one
> of the extensions listed.  If it doesn''t it tries to convert the
file
> to the first extension in the list using imagemagick.  If that fails,
> then it adds a validation error to the model.
>
> Todo:
> - Merge the 0.3.1 updates.
> - Add more tests
> - Add better support for multi-environment use.  In addition to the
> production vs development, multilingual concerns have come up. 
I''m
> using the multilingual plugin, and I might need to grab a different
> version of a file for each locale.  How to make this easy without
> increasing overall complexity?
>
> On 11/16/05, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > my guess is that you''d pass a :crop argument just like you
can with :geometry?
> > I''m assuming (haven''t tested it yet) that all
imagemagick commands are
> > accessible this way:
> > http://www.imagemagick.org/script/command-line-options.php#crop
> >
> > 2005/11/15, Kyle Heon
<kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:
> > > Yeah, I too would definetly like to have a way to crop the photo
being
> > > uploaded in an effort to consistently make square thumbnails.
> > >
> > > I''d be interested to see how others are doing this
currently while using
> > > FileColumn.
> > >
> > > Many thanks for FileColumn, it''s a huge time saver.
> > >
> > > Kyle Heon
> > > kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
> > >
> > >
> > > -----Original Message-----
> > > From:
rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Cristiano Dias
> > > Sent: Tuesday, November 15, 2005 8:05 PM
> > > To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org;
rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository
> > >
> > > Hi there,
> > >
> > > First of all thank you very much for this excellent plugin.
> > >
> > > Answering your questions... yes, I run RMagick in Windows and it
is a
> > > @#*^#@*&# pain. Right now it just doesn''t work,
I''m still trying to figure
> > > out which upgrade broke it. But it is not your fault. :-(
> > >
> > > Now the request... 8-) One feature I could really use is
something like a
> > > before_filter... I made a "poor man''s Flickr"
for my wedding pictures (not
> > > using file_column) and one of the things I do besides the
resizing is a crop
> > > to make the thumbnail square, a la Flickr.
> > > Setting the JPG compression would be another use for this
pre-processing.
> > > More fancy ImageMagick processing could also be easily
integrated...
> > >
> > > Anyway... just throwing some ideas around. ;-)
> > >
> > > On 11/14/05, Sebastian Kanthak
<skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > > Hi there,
> > > >
> > > > I''m happy to announce a new minor release of
file_column. It contains
> > > > two small fixes.
> > > >
> > > > * You can now serialize objects that have a file_column
again, which
> > > > is important if you want to store these objects into the
flash or the
> > > > session.
> > > >
> > > > * If you want to use the RMagick integration and
you''ve installed
> > > > RMagick yourself (instead of as a gem) it should work right
out of the
> > > > box.
> > > >
> > > >
> > > > Apart from these fixes, the plugin is finally available at a
public
> > > > svn repository, so that you can use the cool new plugin
script, rails
> > > > features in its latest release candidate. The repository is
at:
> > > >
> > > >
https://opensvn.csie.org/rails_file_column/plugins/file_column/
> > > >
> > > > Installation is as easy as typing
> > > >
> > > > ./script/plugin install
> > > >
https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
> > > >
> > > > (you can still get an archive at
> > > > http://www.kanthak.net/opensource/file_column/)
> > > >
> > > > in your project''s directory. Warning: The trunk can
be unstable. You
> > > > can find stable releases in the tags directory. Is there a
standard
> > > > way of telling the plugin script about which version to use?
I''m a bit
> > > > confused here, because the standard layout of plugin
repositories does
> > > > not seem to contain the standard tags or branches
directories. Can
> > > > somebody educate me about the repository conventions for
plugins? How
> > > > do you make sure as a plugin developer, that your users only
use
> > > > stable versions by default?
> > > >
> > > >
> > > > On a different note, I need some input on the future
directions of
> > > > file_column, so that it suits your needs as well as
possible. I have
> > > > already discussed some of these ideas with Kyle Maxwell.
Thanks a lot
> > > > for your input, Kyle!
> > > >
> > > > Basically I want to keep file_column as lean and general as
possible,
> > > > while providing some more features that have been requested
often and
> > > > making it easy for you to implement your more exotic needs.
So here
> > > > are two points, where I''d be happy about feedback:
> > > >
> > > > * Right now, I''m using the RMagick library to use
the imagemagick
> > > > toolkit. Is it hard to get this working under Windows? Would
you
> > > > prefer file_column calling the imagemagick commands
directly? I''d like
> > > > to keep the dependency on the RMagick library as it allows
for much
> > > > more beautiful code and easier handling of images.
> > > >
> > > > * The versions feature allows you to declare in the model,
that
> > > > several different sizes of an image should be stored that
can
> > > > subsequently be accessed from your view. Kyle and I feel
that this
> > > > information doesn''t really belong into the model,
so Kyle suggested
> > > > that you can specify a geometry string in the
view''s
> > > > url_for_file_column method. If an image does not exist in
these
> > > > dimensions already, it will be created transparently and
stored so
> > > > that it can be used again in the next request.
> > > >
> > > > What do you think about this feature? Does it make sense?
Should it
> > > > replace the declaration of versions in the model completely
or should
> > > > it be an additional feature?
> > > >
> > > >
> > > > Thanks for all the encouranging feedback I have received so
far!
> > > >
> > > > Sebastian
> > > > _______________________________________________
> > > > Rails mailing list
> > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > > >
> > >
> > >
> > > --
> > > CrisDias, o Síndico
> > > www.vilago.com.br -- Seu site vai gostar de morar aqui
> > > _______________________________________________
> > > Rails mailing list
> > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > >
> > > _______________________________________________
> > > Rails mailing list
> > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > >
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
Line two or three of file_column.rb loads magick_file_column.rb too early. Delete it. magick_file_column.rb will be loaded later by init.rb. Fixed in SVN. Thanks for the report. On 11/17/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi kyle, > I installed your branch and am getting the following error when booting webrick: > > (from locomotive) dependencies.rb:200:in `const_missing'': > uninitialized constant BaseUploadedFile (NameError) > from ./script/../config/../vendor/plugins/kyle/lib/magick_file_column.rb:2 > > though I can see the BaseUploadedFile class in file_column.rb. > > thanks > Oliver > > 2005/11/16, Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>: > > If anyone''s curious, they can check out my branch ( > > http://opensvn.csie.org/rails_file_column/plugins/file_column/branches/kyle/ > > ), which includes the following changes: > > > > Changes: > > - Removed the "versions" implementation. > > - Removed RMagick dependency > > - Complete rewrite of Imagemagick functionality. It uses > > IO.popen("mogrify ..."). > > - Added url_for_file_column "model", "field", :magick => > > command_options. You can pass command options as a string or > > a hash:("-resize 100x100" or :resize => "100x100") > > - Added validates_extension_of(*attr_names). This takes either a > > string or an array of extensions. It validates that the file has one > > of the extensions listed. If it doesn''t it tries to convert the file > > to the first extension in the list using imagemagick. If that fails, > > then it adds a validation error to the model. > > > > Todo: > > - Merge the 0.3.1 updates. > > - Add more tests > > - Add better support for multi-environment use. In addition to the > > production vs development, multilingual concerns have come up. I''m > > using the multilingual plugin, and I might need to grab a different > > version of a file for each locale. How to make this easy without > > increasing overall complexity? > > > > On 11/16/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > my guess is that you''d pass a :crop argument just like you can with :geometry? > > > I''m assuming (haven''t tested it yet) that all imagemagick commands are > > > accessible this way: > > > http://www.imagemagick.org/script/command-line-options.php#crop > > > > > > 2005/11/15, Kyle Heon <kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>: > > > > Yeah, I too would definetly like to have a way to crop the photo being > > > > uploaded in an effort to consistently make square thumbnails. > > > > > > > > I''d be interested to see how others are doing this currently while using > > > > FileColumn. > > > > > > > > Many thanks for FileColumn, it''s a huge time saver. > > > > > > > > Kyle Heon > > > > kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org > > > > > > > > > > > > -----Original Message----- > > > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cristiano Dias > > > > Sent: Tuesday, November 15, 2005 8:05 PM > > > > To: sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository > > > > > > > > Hi there, > > > > > > > > First of all thank you very much for this excellent plugin. > > > > > > > > Answering your questions... yes, I run RMagick in Windows and it is a > > > > @#*^#@*&# pain. Right now it just doesn''t work, I''m still trying to figure > > > > out which upgrade broke it. But it is not your fault. :-( > > > > > > > > Now the request... 8-) One feature I could really use is something like a > > > > before_filter... I made a "poor man''s Flickr" for my wedding pictures (not > > > > using file_column) and one of the things I do besides the resizing is a crop > > > > to make the thumbnail square, a la Flickr. > > > > Setting the JPG compression would be another use for this pre-processing. > > > > More fancy ImageMagick processing could also be easily integrated... > > > > > > > > Anyway... just throwing some ideas around. ;-) > > > > > > > > On 11/14/05, Sebastian Kanthak <skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi there, > > > > > > > > > > I''m happy to announce a new minor release of file_column. It contains > > > > > two small fixes. > > > > > > > > > > * You can now serialize objects that have a file_column again, which > > > > > is important if you want to store these objects into the flash or the > > > > > session. > > > > > > > > > > * If you want to use the RMagick integration and you''ve installed > > > > > RMagick yourself (instead of as a gem) it should work right out of the > > > > > box. > > > > > > > > > > > > > > > Apart from these fixes, the plugin is finally available at a public > > > > > svn repository, so that you can use the cool new plugin script, rails > > > > > features in its latest release candidate. The repository is at: > > > > > > > > > > https://opensvn.csie.org/rails_file_column/plugins/file_column/ > > > > > > > > > > Installation is as easy as typing > > > > > > > > > > ./script/plugin install > > > > > https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk > > > > > > > > > > (you can still get an archive at > > > > > http://www.kanthak.net/opensource/file_column/) > > > > > > > > > > in your project''s directory. Warning: The trunk can be unstable. You > > > > > can find stable releases in the tags directory. Is there a standard > > > > > way of telling the plugin script about which version to use? I''m a bit > > > > > confused here, because the standard layout of plugin repositories does > > > > > not seem to contain the standard tags or branches directories. Can > > > > > somebody educate me about the repository conventions for plugins? How > > > > > do you make sure as a plugin developer, that your users only use > > > > > stable versions by default? > > > > > > > > > > > > > > > On a different note, I need some input on the future directions of > > > > > file_column, so that it suits your needs as well as possible. I have > > > > > already discussed some of these ideas with Kyle Maxwell. Thanks a lot > > > > > for your input, Kyle! > > > > > > > > > > Basically I want to keep file_column as lean and general as possible, > > > > > while providing some more features that have been requested often and > > > > > making it easy for you to implement your more exotic needs. So here > > > > > are two points, where I''d be happy about feedback: > > > > > > > > > > * Right now, I''m using the RMagick library to use the imagemagick > > > > > toolkit. Is it hard to get this working under Windows? Would you > > > > > prefer file_column calling the imagemagick commands directly? I''d like > > > > > to keep the dependency on the RMagick library as it allows for much > > > > > more beautiful code and easier handling of images. > > > > > > > > > > * The versions feature allows you to declare in the model, that > > > > > several different sizes of an image should be stored that can > > > > > subsequently be accessed from your view. Kyle and I feel that this > > > > > information doesn''t really belong into the model, so Kyle suggested > > > > > that you can specify a geometry string in the view''s > > > > > url_for_file_column method. If an image does not exist in these > > > > > dimensions already, it will be created transparently and stored so > > > > > that it can be used again in the next request. > > > > > > > > > > What do you think about this feature? Does it make sense? Should it > > > > > replace the declaration of versions in the model completely or should > > > > > it be an additional feature? > > > > > > > > > > > > > > > Thanks for all the encouranging feedback I have received so far! > > > > > > > > > > Sebastian > > > > > _______________________________________________ > > > > > Rails mailing list > > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > -- > > > > CrisDias, o Síndico > > > > www.vilago.com.br -- Seu site vai gostar de morar aqui > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
On Nov 17, 2005, at 2:40 AM, Vamsee Kanakala wrote:> Sebastian Kanthak wrote: > >> Hi there, >> >> I''m happy to announce a new minor release of file_column. It contains >> two small fixes. >>Hey there folks- I have a small issue with file_column. In a model that displays home floor plans I have 2 file_columns. Everything works great for inputting a new record with 2 photos and saving it and even displaying it with a show action. Where I run into trouble is when you want to edit a record that already exists. But I just want to change some text and have the images left alone. What happens is the edit form assumes that you want to add new photos and so it displays the file upload buttons. I already tried to make the edit view just show the image path text that is stored in the db but when you submit the edit it all blows up because it is expecting files for those attributes Am I missing something? How do you make it work so the edit page will let you either upload new photos or leave the old ones alone without the need to re-upload them every time I just want to edit some other text fields? Help? Thanks- -Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
glad to be of help, thanks for the quick fix.
so, I installed this update and adapted the models and views
accordingly. When I try to render a view using the new
url_for_file_column
url_for_file_column("user", "photo", :magick => (:resize
=> "100x100"))
I get a "uninitialized constant Magick" error with the following
trace:
(locomotive path)/lib/active_support/dependencies.rb:200:in
`const_missing''
#{RAILS_ROOT}/vendor/plugins/kyle/lib/file_column.rb:621:in
`file_column''
2005/11/17, Kyle Maxwell
<kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>:> Line two or three of file_column.rb loads magick_file_column.rb too
> early.  Delete it.  magick_file_column.rb will be loaded later by
> init.rb.  Fixed in SVN.  Thanks for the report.
>
> On 11/17/05, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > hi kyle,
> > I installed your branch and am getting the following error when
booting webrick:
> >
> > (from locomotive) dependencies.rb:200:in `const_missing'':
> > uninitialized constant BaseUploadedFile (NameError)
> >         from
./script/../config/../vendor/plugins/kyle/lib/magick_file_column.rb:2
> >
> > though I can see the BaseUploadedFile class in file_column.rb.
> >
> > thanks
> > Oliver
> >
> > 2005/11/16, Kyle Maxwell
<kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>:
> > > If anyone''s curious, they can check out my branch (
> > >
http://opensvn.csie.org/rails_file_column/plugins/file_column/branches/kyle/
> > > ), which includes the following changes:
> > >
> > > Changes:
> > > - Removed the "versions" implementation.
> > > - Removed RMagick dependency
> > > - Complete rewrite of Imagemagick functionality.  It uses
> > > IO.popen("mogrify ...").
> > > - Added url_for_file_column "model", "field",
:magick =>
> > > command_options.  You can pass command options as a string or
> > > a hash:("-resize 100x100" or :resize =>
"100x100")
> > > - Added validates_extension_of(*attr_names).  This takes either a
> > > string or an array of extensions.  It validates that the file has
one
> > > of the extensions listed.  If it doesn''t it tries to
convert the file
> > > to the first extension in the list using imagemagick.  If that
fails,
> > > then it adds a validation error to the model.
> > >
> > > Todo:
> > > - Merge the 0.3.1 updates.
> > > - Add more tests
> > > - Add better support for multi-environment use.  In addition to
the
> > > production vs development, multilingual concerns have come up. 
I''m
> > > using the multilingual plugin, and I might need to grab a
different
> > > version of a file for each locale.  How to make this easy without
> > > increasing overall complexity?
> > >
> > > On 11/16/05, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > > my guess is that you''d pass a :crop argument just
like you can with :geometry?
> > > > I''m assuming (haven''t tested it yet) that
all imagemagick commands are
> > > > accessible this way:
> > > >
http://www.imagemagick.org/script/command-line-options.php#crop
> > > >
> > > > 2005/11/15, Kyle Heon
<kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:
> > > > > Yeah, I too would definetly like to have a way to crop
the photo being
> > > > > uploaded in an effort to consistently make square
thumbnails.
> > > > >
> > > > > I''d be interested to see how others are doing
this currently while using
> > > > > FileColumn.
> > > > >
> > > > > Many thanks for FileColumn, it''s a huge time
saver.
> > > > >
> > > > > Kyle Heon
> > > > > kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From:
rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > >
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Cristiano Dias
> > > > > Sent: Tuesday, November 15, 2005 8:05 PM
> > > > > To:
sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org;
rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN
repository
> > > > >
> > > > > Hi there,
> > > > >
> > > > > First of all thank you very much for this excellent
plugin.
> > > > >
> > > > > Answering your questions... yes, I run RMagick in
Windows and it is a
> > > > > @#*^#@*&# pain. Right now it just doesn''t
work, I''m still trying to figure
> > > > > out which upgrade broke it. But it is not your fault.
:-(
> > > > >
> > > > > Now the request... 8-) One feature I could really use
is something like a
> > > > > before_filter... I made a "poor man''s
Flickr" for my wedding pictures (not
> > > > > using file_column) and one of the things I do besides
the resizing is a crop
> > > > > to make the thumbnail square, a la Flickr.
> > > > > Setting the JPG compression would be another use for
this pre-processing.
> > > > > More fancy ImageMagick processing could also be easily
integrated...
> > > > >
> > > > > Anyway... just throwing some ideas around. ;-)
> > > > >
> > > > > On 11/14/05, Sebastian Kanthak
<skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > > > > Hi there,
> > > > > >
> > > > > > I''m happy to announce a new minor release
of file_column. It contains
> > > > > > two small fixes.
> > > > > >
> > > > > > * You can now serialize objects that have a
file_column again, which
> > > > > > is important if you want to store these objects
into the flash or the
> > > > > > session.
> > > > > >
> > > > > > * If you want to use the RMagick integration and
you''ve installed
> > > > > > RMagick yourself (instead of as a gem) it should
work right out of the
> > > > > > box.
> > > > > >
> > > > > >
> > > > > > Apart from these fixes, the plugin is finally
available at a public
> > > > > > svn repository, so that you can use the cool new
plugin script, rails
> > > > > > features in its latest release candidate. The
repository is at:
> > > > > >
> > > > > >
https://opensvn.csie.org/rails_file_column/plugins/file_column/
> > > > > >
> > > > > > Installation is as easy as typing
> > > > > >
> > > > > > ./script/plugin install
> > > > > >
https://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
> > > > > >
> > > > > > (you can still get an archive at
> > > > > > http://www.kanthak.net/opensource/file_column/)
> > > > > >
> > > > > > in your project''s directory. Warning: The
trunk can be unstable. You
> > > > > > can find stable releases in the tags directory. Is
there a standard
> > > > > > way of telling the plugin script about which
version to use? I''m a bit
> > > > > > confused here, because the standard layout of
plugin repositories does
> > > > > > not seem to contain the standard tags or branches
directories. Can
> > > > > > somebody educate me about the repository
conventions for plugins? How
> > > > > > do you make sure as a plugin developer, that your
users only use
> > > > > > stable versions by default?
> > > > > >
> > > > > >
> > > > > > On a different note, I need some input on the
future directions of
> > > > > > file_column, so that it suits your needs as well
as possible. I have
> > > > > > already discussed some of these ideas with Kyle
Maxwell. Thanks a lot
> > > > > > for your input, Kyle!
> > > > > >
> > > > > > Basically I want to keep file_column as lean and
general as possible,
> > > > > > while providing some more features that have been
requested often and
> > > > > > making it easy for you to implement your more
exotic needs. So here
> > > > > > are two points, where I''d be happy about
feedback:
> > > > > >
> > > > > > * Right now, I''m using the RMagick
library to use the imagemagick
> > > > > > toolkit. Is it hard to get this working under
Windows? Would you
> > > > > > prefer file_column calling the imagemagick
commands directly? I''d like
> > > > > > to keep the dependency on the RMagick library as
it allows for much
> > > > > > more beautiful code and easier handling of images.
> > > > > >
> > > > > > * The versions feature allows you to declare in
the model, that
> > > > > > several different sizes of an image should be
stored that can
> > > > > > subsequently be accessed from your view. Kyle and
I feel that this
> > > > > > information doesn''t really belong into
the model, so Kyle suggested
> > > > > > that you can specify a geometry string in the
view''s
> > > > > > url_for_file_column method. If an image does not
exist in these
> > > > > > dimensions already, it will be created
transparently and stored so
> > > > > > that it can be used again in the next request.
> > > > > >
> > > > > > What do you think about this feature? Does it make
sense? Should it
> > > > > > replace the declaration of versions in the model
completely or should
> > > > > > it be an additional feature?
> > > > > >
> > > > > >
> > > > > > Thanks for all the encouranging feedback I have
received so far!
> > > > > >
> > > > > > Sebastian
> > > > > > _______________________________________________
> > > > > > Rails mailing list
> > > > > >
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > > >
http://lists.rubyonrails.org/mailman/listinfo/rails
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > CrisDias, o Síndico
> > > > > www.vilago.com.br -- Seu site vai gostar de morar aqui
> > > > > _______________________________________________
> > > > > Rails mailing list
> > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > > > >
> > > > > _______________________________________________
> > > > > Rails mailing list
> > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > > > >
> > > > _______________________________________________
> > > > Rails mailing list
> > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > > >
> > > _______________________________________________
> > > Rails mailing list
> > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > >
> >
>
sorry to be a pest... does this mean FileColumn isn''t able to see my ImageMagick install?> I get a "uninitialized constant Magick" error with the following trace: > > (locomotive path)/lib/active_support/dependencies.rb:200:in `const_missing'' > #{RAILS_ROOT}/vendor/plugins/kyle/lib/file_column.rb:621:in `file_column''
I have a feeling that my merge with 0.3.1 stuff destabilized something. It''s an experimental branch, you know :). I''m currently recovering from oral surgery, but I''ll look into it next week. Kyle On 11/18/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> sorry to be a pest... > does this mean FileColumn isn''t able to see my ImageMagick install? > > > I get a "uninitialized constant Magick" error with the following trace: > > > > (locomotive path)/lib/active_support/dependencies.rb:200:in `const_missing'' > > #{RAILS_ROOT}/vendor/plugins/kyle/lib/file_column.rb:621:in `file_column'' > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi Ezra, On 11/17/05, Ezra Zygmuntowicz <ezra-SD1UcFUIF7QjH4SCZfkgnw@public.gmane.org> wrote:> Am I missing something? How do you make it work so the edit page > will let you either upload new photos or leave the old ones alone > without the need to re-upload them every time I just want to edit > some other text fields?you basically have two options: Either leave the file upload button there and tell your users to simply not submit anything. This should keep the old image. Alternatively you can completely leave out an input element for the image fields. This way, nothing should change either. Hope this helps Sebastian
I know! :) and I appreciate you putting it out for us to experiment, didn''t mean to rush you on this. Hope you recover well from surgery, it doesn''t sound like very much fun. for when you''re better and get a chance to look at it: I''ve been troubleshooting in a thread on textdrive (http://forum.textdrive.com/viewtopic.php?id=7269), seems like the multiple image processing done when saving the model using file_column was taking a big chunk of memory each time, and after processing the memory wouldn''t be reallocated. people there referred to GC not kicking in at the right time because of the way RMagick works (http://rubyforge.org/forum/forum.php?thread_id=1374&forum_id=1618 ). So I figured since your branch didn''t use RMagick, perhaps that would end the problem. thanks again, Oliver 2005/11/19, Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>:> I have a feeling that my merge with 0.3.1 stuff destabilized > something. It''s an experimental branch, you know :). I''m currently > recovering from oral surgery, but I''ll look into it next week. > > Kyle > > On 11/18/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > sorry to be a pest... > > does this mean FileColumn isn''t able to see my ImageMagick install? > > > > > I get a "uninitialized constant Magick" error with the following trace: > > > > > > (locomotive path)/lib/active_support/dependencies.rb:200:in `const_missing'' > > > #{RAILS_ROOT}/vendor/plugins/kyle/lib/file_column.rb:621:in `file_column'' > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi Ryan, thanks for your response. so i''ve added the environment variables the thread mentioned to my .bashrc (don''t have tcsh nor setevn, I''m assuming this would be the way with bash?), and am able to run the test with indentify, mogrify, convert etc successfully, but I''m still getting the same error with kyle''s file_column branch. I also tested with my old ruby/imagemagick/webrick setup I used before swichting to locomotive, and got the same error. the file_column trunk (which uses RMagick) worked under this setup and under locomotive, except for the memory leak I wrote about in my last email. I''m guessing the locomotive setup isn''t be the problem in this case? - Oliver 2005/11/19, Ryan Raaum <ryan.raaum-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> Hi Oliver, > > Not all the required environment variables are set in the terminal > from locomotive to be able to successfully use rmagick via webrick. > See the locomotive-users thread > > http://one.textdrive.com/pipermail/locomotive-users/2005-November/000021.html > > --r > > On 11/18/05, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > sorry to be a pest... > > does this mean FileColumn isn''t able to see my ImageMagick install? > > > > > I get a "uninitialized constant Magick" error with the following trace: > > > > > > (locomotive path)/lib/active_support/dependencies.rb:200:in `const_missing'' > > > #{RAILS_ROOT}/vendor/plugins/kyle/lib/file_column.rb:621:in `file_column'' > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Ryan Raaum > http://www.rockefeller.edu -- Bacterial Pathogenesis and Immunology > http://www.worldmartial.com -- Black Belt Instructor > http://locomotive.sourceforge.net -- Self contained one-click Rails for Mac OS X >
On Nov 19, 2005, at 3:13 AM, Sebastian Kanthak wrote:> Hi Ezra, > > On 11/17/05, Ezra Zygmuntowicz <ezra-SD1UcFUIF7QjH4SCZfkgnw@public.gmane.org> wrote: >> Am I missing something? How do you make it work so the >> edit page >> will let you either upload new photos or leave the old ones alone >> without the need to re-upload them every time I just want to edit >> some other text fields? > > you basically have two options: Either leave the file upload button > there and tell your users to simply not submit anything. This should > keep the old image. Alternatively you can completely leave out an > input element for the image fields. This way, nothing should change > either. > > Hope this helps > SebastianSebastian- OK thanks. I have it working now by just having them leave the file upload fields alone. That works fine. Cheers- -Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732
I''m just starting to learn Ruby so please forgive the bombarding of
questions.
What is the syntax then if I wanted to crop an image say 80x80 with center
weigthing (belive it''s -gravity)? I want to always create an 80x80
square
thumb and then a series of propotional images.
Can all of this be done by setting the model? Right now my model looks like
this:
file_column :gallery_thumbnail, :magick => {
  :versions => { "thumb" => "80x80" }
}
What should it look like to accomplish what I describe above.
Many thanks for any assistance anyone can provide.
Kyle Heon
kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
-----Original Message-----
From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Kyle Maxwell
Sent: Wednesday, November 16, 2005 1:20 PM
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository
If you use my branch, assuming png support is compiled into imagemagick, you
can:
url_for_file_column "model", "field", :magick => {:format
=>"png", :resize
=> "10x10"}
Alternately:
url_for_file_column "model", "field", :magick =>
"-format png -resize 10x10"
On 11/16/05, Spiceee <spiceee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> It would be great if you could set prefered image formats along with 
> resizes - smaller files usually look better in png or gif but with 
> larger files jpeg has a better quality/size ratio.
>
> I reckon Rmagick has no ''convert'' method per se (it
converts formats
> on-the-fly when a file is saved with a different extension) that''s
the
> main reason I''m going to tamper with the code for file_column a
bit..
>
> spe.
>
>
> On 11/16/05, Hunter Hillegas
<lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf@public.gmane.org> wrote:
> > Kyle,
> >
> > Interesting work.
> >
> > Does your branch save the results of the transformations so they 
> > don''t need to be run each time they are displayed (i.e.
Changing the
> > size only creates a new file the first time and subsequent requests
pull
up that file)?> >
> > Hunter
> >
> > > From: Kyle Maxwell
<kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>
> > > Reply-To:
<rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> > > Date: Wed, 16 Nov 2005 09:29:59 -0800
> > > To:
<rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository
> > >
> > > 0.3.0 only supported the :geometry option, and that should be
true
> > > of 0.3.1.  Try my branch for generic imagemagick capabilities.  
> > > You can pass any of the command line options, but remember that
my
> > > branch is experimental (although I use it in my production
sites),
> > > and that imagemagick transformations are handled in the view 
> > > (url_for_file_column).
> > >
> > > On 11/16/05, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > >> actually, I think I may have guessed wrong. I just had a look
at
> > >> magick_file_column.rb, from what I could make out of the code
(my
> > >> knowledgeg of ruby is limited), it seems only resizing is
working
> > >> right now...
> > >>
> > >> 2005/11/16, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> > >>> my guess is that you''d pass a :crop argument
just like you can
> > >>> with :geometry?
> > >>> I''m assuming (haven''t tested it yet)
that all imagemagick
> > >>> commands are accessible this way:
> > >>>
http://www.imagemagick.org/script/command-line-options.php#crop
> > >>>
> > >>> 2005/11/15, Kyle Heon
<kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:
> > >>>> Yeah, I too would definetly like to have a way to
crop the
> > >>>> photo being uploaded in an effort to consistently
make square
thumbnails.> > >>>>
> > >>>> I''d be interested to see how others are
doing this currently
> > >>>> while using FileColumn.
> > >>>>
> > >>>> Many thanks for FileColumn, it''s a huge time
saver.
> > >>>>
> > >>>> Kyle Heon
> > >>>> kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
> > >>>>
> > >>>>
> > >>>> -----Original Message-----
> > >>>> From:
rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>>
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of
> > >>>> Cristiano Dias
> > >>>> Sent: Tuesday, November 15, 2005 8:05 PM
> > >>>> To:
sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org;
rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>> Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN
> > >>>> repository
> > >>>>
> > >>>> Hi there,
> > >>>>
> > >>>> First of all thank you very much for this excellent
plugin.
> > >>>>
> > >>>> Answering your questions... yes, I run RMagick in
Windows and
> > >>>> it is a @#*^#@*&# pain. Right now it just
doesn''t work, I''m
> > >>>> still trying to figure out which upgrade broke it.
But it is
> > >>>> not your fault. :-(
> > >>>>
> > >>>> Now the request... 8-) One feature I could really use
is
> > >>>> something like a before_filter... I made a "poor
man''s Flickr"
> > >>>> for my wedding pictures (not using file_column) and
one of the
> > >>>> things I do besides the resizing is a crop to make
the
> > >>>> thumbnail square, a la Flickr.
> > >>>> Setting the JPG compression would be another use for
this
pre-processing.> > >>>> More fancy ImageMagick processing could also be
easily
integrated...> > >>>>
> > >>>> Anyway... just throwing some ideas around. ;-)
> > >>>>
> > >>>> On 11/14/05, Sebastian Kanthak
<skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > >>>>> Hi there,
> > >>>>>
> > >>>>> I''m happy to announce a new minor
release of file_column. It
> > >>>>> contains two small fixes.
> > >>>>>
> > >>>>> * You can now serialize objects that have a
file_column again,
> > >>>>> which is important if you want to store these
objects into the
> > >>>>> flash or the session.
> > >>>>>
> > >>>>> * If you want to use the RMagick integration and
you''ve
> > >>>>> installed RMagick yourself (instead of as a gem)
it should
> > >>>>> work right out of the box.
> > >>>>>
> > >>>>>
> > >>>>> Apart from these fixes, the plugin is finally
available at a
> > >>>>> public svn repository, so that you can use the
cool new plugin
> > >>>>> script, rails features in its latest release
candidate. The
repository is at:> > >>>>>
> > >>>>>
https://opensvn.csie.org/rails_file_column/plugins/file_column
> > >>>>> /
> > >>>>>
> > >>>>> Installation is as easy as typing
> > >>>>>
> > >>>>> ./script/plugin install
> > >>>>>
https://opensvn.csie.org/rails_file_column/plugins/file_column
> > >>>>> /trunk
> > >>>>>
> > >>>>> (you can still get an archive at
> > >>>>> http://www.kanthak.net/opensource/file_column/)
> > >>>>>
> > >>>>> in your project''s directory. Warning:
The trunk can be
> > >>>>> unstable. You can find stable releases in the
tags directory.
> > >>>>> Is there a standard way of telling the plugin
script about
> > >>>>> which version to use? I''m a bit confused
here, because the
> > >>>>> standard layout of plugin repositories does not
seem to
> > >>>>> contain the standard tags or branches
directories. Can
> > >>>>> somebody educate me about the repository
conventions for
> > >>>>> plugins? How do you make sure as a plugin
developer, that your
users only use stable versions by default?> > >>>>>
> > >>>>>
> > >>>>> On a different note, I need some input on the
future
> > >>>>> directions of file_column, so that it suits your
needs as well
> > >>>>> as possible. I have already discussed some of
these ideas with
> > >>>>> Kyle Maxwell. Thanks a lot for your input, Kyle!
> > >>>>>
> > >>>>> Basically I want to keep file_column as lean and
general as
> > >>>>> possible, while providing some more features that
have been
> > >>>>> requested often and making it easy for you to
implement your
> > >>>>> more exotic needs. So here are two points, where
I''d be happy
about feedback:> > >>>>>
> > >>>>> * Right now, I''m using the RMagick
library to use the
> > >>>>> imagemagick toolkit. Is it hard to get this
working under
> > >>>>> Windows? Would you prefer file_column calling the
imagemagick
> > >>>>> commands directly? I''d like to keep the
dependency on the
> > >>>>> RMagick library as it allows for much more
beautiful code and
easier handling of images.> > >>>>>
> > >>>>> * The versions feature allows you to declare in
the model,
> > >>>>> that several different sizes of an image should
be stored that
> > >>>>> can subsequently be accessed from your view. Kyle
and I feel
> > >>>>> that this information doesn''t really
belong into the model, so
> > >>>>> Kyle suggested that you can specify a geometry
string in the
> > >>>>> view''s url_for_file_column method. If an
image does not exist
> > >>>>> in these dimensions already, it will be created
transparently
> > >>>>> and stored so that it can be used again in the
next request.
> > >>>>>
> > >>>>> What do you think about this feature? Does it
make sense?
> > >>>>> Should it replace the declaration of versions in
the model
> > >>>>> completely or should it be an additional feature?
> > >>>>>
> > >>>>>
> > >>>>> Thanks for all the encouranging feedback I have
received so far!
> > >>>>>
> > >>>>> Sebastian
> > >>>>> _______________________________________________
> > >>>>> Rails mailing list
> > >>>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>>>
http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>>>>
> > >>>>
> > >>>>
> > >>>> --
> > >>>> CrisDias, o Síndico
> > >>>> www.vilago.com.br -- Seu site vai gostar de morar
aqui
> > >>>> _______________________________________________
> > >>>> Rails mailing list
> > >>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>> http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>>>
> > >>>> _______________________________________________
> > >>>> Rails mailing list
> > >>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >>>> http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>>>
> > >>>
> > >> _______________________________________________
> > >> Rails mailing list
> > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > >> http://lists.rubyonrails.org/mailman/listinfo/rails
> > >>
> > > _______________________________________________
> > > Rails mailing list
> > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> >
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails
hi Kyle,
a per earlier on this thread (see Kyle Maxwell''s posts about his
branch), FileColumn is moving towards doing the processing in the
view... not positive about the syntax in your case, but I''d try
something like
url_for_file_column "your_model", "gallery", :magick => {
:gravity =>
"Center", :crop => "80x80"}
or
url_for_file_column "your_model", "gallery", :magick => {
"-gravity
Center -crop 80x80"}
if neither work, I''d look more into how the imagemagick commands
interact
http://www.imagemagick.org/script/command-line-options.php#crop
hope this helps,
Oliver
2005/11/23, Kyle Heon
<kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:> I''m just starting to learn Ruby so please forgive the bombarding
of
> questions.
>
> What is the syntax then if I wanted to crop an image say 80x80 with center
> weigthing (belive it''s -gravity)? I want to always create an 80x80
square
> thumb and then a series of propotional images.
>
> Can all of this be done by setting the model? Right now my model looks like
> this:
>
> file_column :gallery_thumbnail, :magick => {
>   :versions => { "thumb" => "80x80" }
> }
>
> What should it look like to accomplish what I describe above.
>
> Many thanks for any assistance anyone can provide.
>
> Kyle Heon
> kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
>
>
> -----Original Message-----
> From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Kyle Maxwell
> Sent: Wednesday, November 16, 2005 1:20 PM
> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN repository
>
> If you use my branch, assuming png support is compiled into imagemagick,
you
> can:
>
> url_for_file_column "model", "field", :magick =>
{:format =>"png", :resize
> => "10x10"}
>
> Alternately:
>
> url_for_file_column "model", "field", :magick =>
"-format png -resize 10x10"
>
> On 11/16/05, Spiceee
<spiceee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > It would be great if you could set prefered image formats along with
> > resizes - smaller files usually look better in png or gif but with
> > larger files jpeg has a better quality/size ratio.
> >
> > I reckon Rmagick has no ''convert'' method per se (it
converts formats
> > on-the-fly when a file is saved with a different extension)
that''s the
> > main reason I''m going to tamper with the code for file_column
a bit..
> >
> > spe.
> >
> >
> > On 11/16/05, Hunter Hillegas
<lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf@public.gmane.org> wrote:
> > > Kyle,
> > >
> > > Interesting work.
> > >
> > > Does your branch save the results of the transformations so they
> > > don''t need to be run each time they are displayed (i.e.
Changing the
> > > size only creates a new file the first time and subsequent
requests pull
> up that file)?
> > >
> > > Hunter
> > >
> > > > From: Kyle Maxwell
<kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org>
> > > > Reply-To:
<rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> > > > Date: Wed, 16 Nov 2005 09:29:59 -0800
> > > > To:
<rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> > > > Subject: Re: [Rails] [ANN] file_column 0.3.1 with SVN
repository
> > > >
> > > > 0.3.0 only supported the :geometry option, and that should
be true
> > > > of 0.3.1.  Try my branch for generic imagemagick
capabilities.
> > > > You can pass any of the command line options, but remember
that my
> > > > branch is experimental (although I use it in my production
sites),
> > > > and that imagemagick transformations are handled in the view
> > > > (url_for_file_column).
> > > >
> > > > On 11/16/05, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > >> actually, I think I may have guessed wrong. I just had a
look at
> > > >> magick_file_column.rb, from what I could make out of the
code (my
> > > >> knowledgeg of ruby is limited), it seems only resizing
is working
> > > >> right now...
> > > >>
> > > >> 2005/11/16, Oliver Barnes
<ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> > > >>> my guess is that you''d pass a :crop
argument just like you can
> > > >>> with :geometry?
> > > >>> I''m assuming (haven''t tested it
yet) that all imagemagick
> > > >>> commands are accessible this way:
> > > >>>
http://www.imagemagick.org/script/command-line-options.php#crop
> > > >>>
> > > >>> 2005/11/15, Kyle Heon
<kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org>:
> > > >>>> Yeah, I too would definetly like to have a way
to crop the
> > > >>>> photo being uploaded in an effort to
consistently make square
> thumbnails.
> > > >>>>
> > > >>>> I''d be interested to see how others are
doing this currently
> > > >>>> while using FileColumn.
> > > >>>>
> > > >>>> Many thanks for FileColumn, it''s a huge
time saver.
> > > >>>>
> > > >>>> Kyle Heon
> > > >>>> kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org
> > > >>>>
> > > >>>>
> > > >>>> -----Original Message-----
> > > >>>> From:
rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > >>>>
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of
> > > >>>> Cristiano Dias
> > > >>>> Sent: Tuesday, November 15, 2005 8:05 PM
> > > >>>> To:
sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org;
rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > >>>> Subject: Re: [Rails] [ANN] file_column 0.3.1
with SVN
> > > >>>> repository
> > > >>>>
> > > >>>> Hi there,
> > > >>>>
> > > >>>> First of all thank you very much for this
excellent plugin.
> > > >>>>
> > > >>>> Answering your questions... yes, I run RMagick
in Windows and
> > > >>>> it is a @#*^#@*&# pain. Right now it just
doesn''t work, I''m
> > > >>>> still trying to figure out which upgrade broke
it. But it is
> > > >>>> not your fault. :-(
> > > >>>>
> > > >>>> Now the request... 8-) One feature I could
really use is
> > > >>>> something like a before_filter... I made a
"poor man''s Flickr"
> > > >>>> for my wedding pictures (not using file_column)
and one of the
> > > >>>> things I do besides the resizing is a crop to
make the
> > > >>>> thumbnail square, a la Flickr.
> > > >>>> Setting the JPG compression would be another use
for this
> pre-processing.
> > > >>>> More fancy ImageMagick processing could also be
easily
> integrated...
> > > >>>>
> > > >>>> Anyway... just throwing some ideas around. ;-)
> > > >>>>
> > > >>>> On 11/14/05, Sebastian Kanthak
<skanthak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > >>>>> Hi there,
> > > >>>>>
> > > >>>>> I''m happy to announce a new minor
release of file_column. It
> > > >>>>> contains two small fixes.
> > > >>>>>
> > > >>>>> * You can now serialize objects that have a
file_column again,
> > > >>>>> which is important if you want to store
these objects into the
> > > >>>>> flash or the session.
> > > >>>>>
> > > >>>>> * If you want to use the RMagick integration
and you''ve
> > > >>>>> installed RMagick yourself (instead of as a
gem) it should
> > > >>>>> work right out of the box.
> > > >>>>>
> > > >>>>>
> > > >>>>> Apart from these fixes, the plugin is
finally available at a
> > > >>>>> public svn repository, so that you can use
the cool new plugin
> > > >>>>> script, rails features in its latest release
candidate. The
> repository is at:
> > > >>>>>
> > > >>>>>
https://opensvn.csie.org/rails_file_column/plugins/file_column
> > > >>>>> /
> > > >>>>>
> > > >>>>> Installation is as easy as typing
> > > >>>>>
> > > >>>>> ./script/plugin install
> > > >>>>>
https://opensvn.csie.org/rails_file_column/plugins/file_column
> > > >>>>> /trunk
> > > >>>>>
> > > >>>>> (you can still get an archive at
> > > >>>>>
http://www.kanthak.net/opensource/file_column/)
> > > >>>>>
> > > >>>>> in your project''s directory.
Warning: The trunk can be
> > > >>>>> unstable. You can find stable releases in
the tags directory.
> > > >>>>> Is there a standard way of telling the
plugin script about
> > > >>>>> which version to use? I''m a bit
confused here, because the
> > > >>>>> standard layout of plugin repositories does
not seem to
> > > >>>>> contain the standard tags or branches
directories. Can
> > > >>>>> somebody educate me about the repository
conventions for
> > > >>>>> plugins? How do you make sure as a plugin
developer, that your
> users only use stable versions by default?
> > > >>>>>
> > > >>>>>
> > > >>>>> On a different note, I need some input on
the future
> > > >>>>> directions of file_column, so that it suits
your needs as well
> > > >>>>> as possible. I have already discussed some
of these ideas with
> > > >>>>> Kyle Maxwell. Thanks a lot for your input,
Kyle!
> > > >>>>>
> > > >>>>> Basically I want to keep file_column as lean
and general as
> > > >>>>> possible, while providing some more features
that have been
> > > >>>>> requested often and making it easy for you
to implement your
> > > >>>>> more exotic needs. So here are two points,
where I''d be happy
> about feedback:
> > > >>>>>
> > > >>>>> * Right now, I''m using the RMagick
library to use the
> > > >>>>> imagemagick toolkit. Is it hard to get this
working under
> > > >>>>> Windows? Would you prefer file_column
calling the imagemagick
> > > >>>>> commands directly? I''d like to keep
the dependency on the
> > > >>>>> RMagick library as it allows for much more
beautiful code and
> easier handling of images.
> > > >>>>>
> > > >>>>> * The versions feature allows you to declare
in the model,
> > > >>>>> that several different sizes of an image
should be stored that
> > > >>>>> can subsequently be accessed from your view.
Kyle and I feel
> > > >>>>> that this information doesn''t
really belong into the model, so
> > > >>>>> Kyle suggested that you can specify a
geometry string in the
> > > >>>>> view''s url_for_file_column method.
If an image does not exist
> > > >>>>> in these dimensions already, it will be
created transparently
> > > >>>>> and stored so that it can be used again in
the next request.
> > > >>>>>
> > > >>>>> What do you think about this feature? Does
it make sense?
> > > >>>>> Should it replace the declaration of
versions in the model
> > > >>>>> completely or should it be an additional
feature?
> > > >>>>>
> > > >>>>>
> > > >>>>> Thanks for all the encouranging feedback I
have received so far!
> > > >>>>>
> > > >>>>> Sebastian
> > > >>>>>
_______________________________________________
> > > >>>>> Rails mailing list
> > > >>>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > >>>>>
http://lists.rubyonrails.org/mailman/listinfo/rails
> > > >>>>>
> > > >>>>
> > > >>>>
> > > >>>> --
> > > >>>> CrisDias, o Síndico
> > > >>>> www.vilago.com.br -- Seu site vai gostar de
morar aqui
> > > >>>> _______________________________________________
> > > >>>> Rails mailing list
> > > >>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > >>>>
http://lists.rubyonrails.org/mailman/listinfo/rails
> > > >>>>
> > > >>>> _______________________________________________
> > > >>>> Rails mailing list
> > > >>>>
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > >>>>
http://lists.rubyonrails.org/mailman/listinfo/rails
> > > >>>>
> > > >>>
> > > >> _______________________________________________
> > > >> Rails mailing list
> > > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > >> http://lists.rubyonrails.org/mailman/listinfo/rails
> > > >>
> > > > _______________________________________________
> > > > Rails mailing list
> > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > >
> > >
> > > _______________________________________________
> > > Rails mailing list
> > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > >
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
Hi Kyle, On 11/24/05, Kyle Heon <kheon-Wuw85uim5zDR7s880joybQ@public.gmane.org> wrote:> What is the syntax then if I wanted to crop an image say 80x80 with center > weigthing (belive it''s -gravity)? I want to always create an 80x80 square > thumb and then a series of propotional images.unfortunately, the current stable release does not support this, yet. However, the project''s "trunk" allows you to do the following: <%= url_for_image_column @entry, "image", :size =>"80x80", :crop => "1:1" %> The same thing can be specified in the model as well. Note, however, that the code is still a bit rough and may have some bugs. Hopefully, a new release will follow shortly. Sebastian
Hi all,
First of all, thanks for the great work on file_column, I''m having some
weird problems though, maybe soemone can help me out.
Uploading works but the uploaded files have the wrong permission (600)
so I can''t show them without manually changing the permission.
Another problem is with file_column in combination with magick.
I have a model like this:
class Note < ActiveRecord::Base
file_column :image, :magick => { :versions => { "thumb" =>
"100x100",
"medium" => "640x480>" }}
end
Now, If I understand correctly, this would result in directories like:
''public/note/image/26/thumb/'' and
''public/note/image/26/medium/''
containing the images. However, instead of the ''thumb'' and
''medium''
directory I get directories with weird names, like ''2489u2''
and
''fcfwrb''
Any idea what''s going on here?
-- 
Posted via http://www.ruby-forum.com/.
Hi Jeroen, On 11/30/05, Jeroen janssen <jeroen-5fGJ/kX/fGk@public.gmane.org> wrote:> Uploading works but the uploaded files have the wrong permission (600) > so I can''t show them without manually changing the permission.the permissions are controlled by the process'' umask. I think, if you set the umask to something more liberal in your environment.rb, you should be fine.> Another problem is with file_column in combination with magick. > > I have a model like this: > > class Note < ActiveRecord::Base > file_column :image, :magick => { :versions => { "thumb" => "100x100", > "medium" => "640x480>" }} > end > > Now, If I understand correctly, this would result in directories like: > ''public/note/image/26/thumb/'' and ''public/note/image/26/medium/'' > containing the images. However, instead of the ''thumb'' and ''medium'' > directory I get directories with weird names, like ''2489u2'' and > ''fcfwrb'' > > Any idea what''s going on here?It looks like you are using the latest version from trunk? I''m currently playing around with this stuff, so things might change. If you want something more stable, look at the releases in the "tags" directory. The weird names are based on hashing the options used for the hash. The idea is that you can specify the options in the view, like this, too: <%= url_for_image_column "entry", "image", "50x50" %> In this case, file_column has no clue what name to use, that''s why the hashes are coming into play. Having said this, I''m considering changing the default name for versions declared in the model the way you described. You can always set a custom name, via the :name option: :versions => { :thumb => {:size => "50x50", :name => "foo" } } Sebastian
I''ve run into a problem using both file_column (latest SVN release) and RMagick within the same app. Ever since I installed the plugin my "old style" non-file_column uploads/image processing code stopped working. I''d get the error: "Uninitialized Constant ''Image''" which didn''t make much sense. The code looked something like this: ## Image Model require ''RMagick'' def process ... img = Magick::Image.read( @file.path ) <-- it''d die here ... end Eventually, when I did a logger.debug Magick, it was more obvious. This is the output: FileColumn::Magick Is there a namespace collision here? What''s going on. I''m in the process of converting my site to use file_column, but until thats complete I have to use both methods. Is there a way to avoid having file_column collide with RMagick in this way? Thanks Adam _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I am using file_column 0.3.1 and would say that the biggest problem is 
documentation/examples.
RMagick was easy to setup on Windows once the correct download/readme 
was found. There is a RMagick installer for Windows which includes 
dependancies. You just need to remember to run the postinstall.rb script 
afterwards as per readme.
I am having a problem though. Basically I have it all setup, I can 
upload and display file which are re-sized as per geometry. But the 
versions are not created... no thumbsnails.
My code is:
[code]
file_column :image,
            :magick => { :geometry => "100x100>" },
            :versions => { "thumb" => "50x50>" }
[/code]
Any ideas?
-- 
Posted via http://www.ruby-forum.com/.
Sebastian Kanthak
2005-Dec-12  23:15 UTC
Re: Re: [ANN] file_column 0.3.1 with SVN repository
On 12/12/05, Kris <krisleech-BSIDdvZawMx9qp0gCGiW7Q@public.gmane.org> wrote:> I am using file_column 0.3.1 and would say that the biggest problem is > documentation/examples.I have a fair bit of documentation in the rdocs, but you have to generate the docs with "rake plugindocs". Of course, more docs are always better, so patches are very welcome! A complete minimal example (including model, controller, view, schema...) would be nice, too. So if anybody writes own be sure to send it to me and I''ll include it.> [code] > file_column :image, > :magick => { :geometry => "100x100>" }, > :versions => { "thumb" => "50x50>" } > [/code] > > Any ideas?the syntax for the current svn trunk is ":versions => { :thumb => "50x50>" }", perhaps this is the reason? Sebastian
A new question: I want to offer my users the ability to add images in two ways: 1) Upload the image 2) Provide a URL to an existing image. The back-end code will download the picture (using Net::HTTP) and save it to disk where file_column expectgs it. ...the current catch is that I''d like to be able to use the file_column helpers for both methods, but I run into a problem. For method #1 I can do: @product = Product.new( @params[:product] ) @product.pictures << Picture.new( @params[:picture] ) for method #2, if I can''t seem to get around file_column, ie: @product = Product.new( @params[:product] ) @picture = Picture.new ## Download picture, save to disk code goes here @picture.filename = @params[''picture_url'']; <-- # This will die @product.picutres << @picture I can''t just "force" a filename. I hope this makes sense. Any suggestions on how to make this work? Thanks -- Posted via http://www.ruby-forum.com/.
In the file_column trunk, there''s file_compat.rb, which is included when file_column sees a non-uploaded file, so that the additional methods of a CGI-uploaded file are present. Take a look at that code and patch it into your current installation, or use the current trunk (stability is uncertain, though there''s good test coverage.) Also, if you are on Ruby 1.8.3, all you have to do to get a remote file is: require ''open-uri'' begin @picture.filename = open @params[''picture_url'']; catch #Open will throw all kinds of exceptions: connection errors, 404''s, malformed URLs, etc end On 12/19/05, adam roth <adam-rGtxr/euH6n2IRrHB3mpnw@public.gmane.org> wrote:> A new question: > > I want to offer my users the ability to add images in two ways: > > 1) Upload the image > 2) Provide a URL to an existing image. The back-end code will download > the picture (using Net::HTTP) and save it to disk where file_column > expectgs it. > > ...the current catch is that I''d like to be able to use the file_column > helpers for both methods, but I run into a problem. For method #1 I can > do: > > @product = Product.new( @params[:product] ) > @product.pictures << Picture.new( @params[:picture] ) > > for method #2, if I can''t seem to get around file_column, ie: > > @product = Product.new( @params[:product] ) > @picture = Picture.new > > ## Download picture, save to disk code goes here > > @picture.filename = @params[''picture_url'']; <-- # This will die > @product.picutres << @picture > > I can''t just "force" a filename. I hope this makes sense. > > Any suggestions on how to make this work? > > Thanks > > > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Kyle,
Thanks for the suggestions. I have been working off the trunk so this 
shouldn''t be too diffucult to implement. A couple issues though:
When I do:
  @picture.filename = open @params[''picture_url''];
I get ''undefined method `original_filename'' for 
#<File:/tmp/open-uri298.0>''
..but when I do:
  @picture.filename = File.new(''/tmp/foo/bar.png'');
it runs correctly. Any idea on getting that open-uri download code 
working correctly (or am I missing something)?
Thanks again. You''ve been helpful.
Adam
-- 
Posted via http://www.ruby-forum.com/.
On 12/20/05, adam roth <adam@ridefetish.com> wrote:> Kyle, > > Thanks for the suggestions. I have been working off the trunk so this > shouldn't be too diffucult to implement. A couple issues though: > > > When I do: > > @picture.filename = open @params['picture_url']; > > I get 'undefined method `original_filename' for > #<File:/tmp/open-uri298.0>' > > > > ..but when I do: > > @picture.filename = File.new('/tmp/foo/bar.png'); > > it runs correctly. Any idea on getting that open-uri download code > working correctly (or am I missing something)? > > Thanks again. You've been helpful. > > Adam > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >irb:> open(@params['picture_url']).class => Tempfile You can't assign a Tempfile to file_column, because then the extension/mime-type handling is screwed. A tempfile looks like /tmp/mytemp34222.0. So it's not recommended. You can copy the tempfile and reopen as a normal File, or if you're feeling hackish, you can change line 46 of lib/file_column.rb to: if file.is_a?(File) || file.is_a?(Tempfile) and brave the consequences. -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails