@Jonathan - Thanks for the reply. I believe my usage is within the
scope of what you have said above, as in when the paperclip object is
first being initialized, the proc should run and be used for the style
sizing.
So I have two different thumbnail dimensions based upon the parent
objects attributes, for simplicity sake, I have an "A" image size and
a "B" image size.
If a user creates a paperclip object of image size A, and then on the
next request attempts to create a new object of image size "B", the
style attributes of size A are cached/persisted.
Is this the proper behavior? The site users usually re-upload and on
the 2nd or 3rd try, all seems to be well.
TIA
Timmy
On Nov 30, 10:30 am, Adam Grant <
adam.jgr...@gmail.com> wrote:
> It would seem that your :custom style does no resizing at all. In fact it
> seems to just store the image in it's full size, or am I misinterpreting
> your question?
>
> If that is the case, then you don't need to define :original. It will
> automatically get set to the full image. What you really should have is
> this:
>
> :style => {
> :medium => '250x250>',
> :small => '50x50'
>
> }
>
> That will store three images: original, medium, and small to your preferred
> storage location. Original is always there, and will default to an
> unprocessed file (unless you overwrite it like you did).
>
> If you need to resize based on some other attributes (for example, if
> photo_height and photo_width were form inputs that the user could specify),
> then you need to build your own custom processor. See this as an example:
>
>
http://mdeering.com/posts/018-paperclip-processors-doing-so-much-more...
>
> Cheers,
> Adam
> --
> Adam Grant
> Lead Web Engineer
> Telaeris, Inc.
>
> >
paperclip-plug...@googlegroups.com<
paperclip-plugin%2Bunsu...@googlegroups.com>