You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Murray Altheim <mu...@altheim.com> on 2008/08/04 02:55:58 UTC

Image thumbnail proposal

Hi,

I've got a new proposal to add a thumbnail feature to the Image plugin.
This entails a few changes to the Image plugin and an additional utility
class to generate the thumbnails.

Basically, the syntax is augmented such that a value of "thumbnail" in
the 'link' parameter will generate a thumbnail, with the thumbnail a
link to the original image. Optionally the 'width' parameter can be used
to set the width of the generated thumbnail (the height is ignored as it
is proportional to width). This works for PNG, JPEG and GIF images --
other image types throw an PluginException. E.g.,

   [{Image src='attach/ForumPlugin/forum1.png' link='thumbnail'}]

This works with relative paths on the server (except those beginning
with "..", which is prohibited), as well as external (http:) references.
The generated thumbnails are cached in ./work/thumbnails/.

I've tested this and haven't noted any problems with it.

If this is approved I'd like to know which branch to submit it to in
SVN (e.g., trunk?).

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: Image thumbnail proposal

Posted by Murray Altheim <mu...@altheim.com>.
Janne Jalkanen wrote:
> 
> Please check dynamic attachments before proceeding.  They are meant for 
> this.

I've already proceeded.

I don't know what you mean by "dynamic attachments", nor does that
term show up on jspwiki.org except on "JSP Wiki 3 Design" as a
link (with no page). Is this some kind of new feature, and if so,
when do you think it will appear? Are you suggesting that there is
no need for a thumbnail feature addition to the Image plugin?

In the interim I have added it to the CeryleWikiPlugins, though it
won't show up until I update the site some time in the next month.

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: Image thumbnail proposal

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Please check dynamic attachments before proceeding.  They are meant  
for this.

On Aug 4, 2008, at 03:55 , Murray Altheim wrote:

> Hi,
>
> I've got a new proposal to add a thumbnail feature to the Image  
> plugin.
> This entails a few changes to the Image plugin and an additional  
> utility
> class to generate the thumbnails.
>
> Basically, the syntax is augmented such that a value of "thumbnail" in
> the 'link' parameter will generate a thumbnail, with the thumbnail a
> link to the original image. Optionally the 'width' parameter can be  
> used
> to set the width of the generated thumbnail (the height is ignored  
> as it
> is proportional to width). This works for PNG, JPEG and GIF images --
> other image types throw an PluginException. E.g.,
>
>   [{Image src='attach/ForumPlugin/forum1.png' link='thumbnail'}]
>
> This works with relative paths on the server (except those beginning
> with "..", which is prohibited), as well as external (http:)  
> references.
> The generated thumbnails are cached in ./work/thumbnails/.
>
> I've tested this and haven't noted any problems with it.
>
> If this is approved I'd like to know which branch to submit it to in
> SVN (e.g., trunk?).
>
> Murray
>
> ...................................................................... 
> .....
> Murray Altheim <murray07 at altheim.com>                            
> ===  = =
> http://www.altheim.com/murray/                                      
> = =  ===
> SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk                
> = =  = =
>
>       Boundless wind and moon - the eye within eyes,
>       Inexhaustible heaven and earth - the light beyond light,
>       The willow dark, the flower bright - ten thousand houses,
>       Knock at any door - there's one who will respond.
>                                       -- The Blue Cliff Record


Re: Image thumbnail proposal

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Or even better, create JIRA issue, and attach a patch.

On Aug 4, 2008, at 06:30 , Andrew Jaquith wrote:

> Sounds great (seriously!)... but I think it might have to wait  
> until 2.8.1. We need to fix bugs at this point rather than add  
> features. In fact, I think we ought to promote the current Alpha to  
> Beta.
>
> Andrew
>
> On Aug 3, 2008, at 8:55 PM, Murray Altheim wrote:
>
>> Hi,
>>
>> I've got a new proposal to add a thumbnail feature to the Image  
>> plugin.
>> This entails a few changes to the Image plugin and an additional  
>> utility
>> class to generate the thumbnails.
>>
>> Basically, the syntax is augmented such that a value of  
>> "thumbnail" in
>> the 'link' parameter will generate a thumbnail, with the thumbnail a
>> link to the original image. Optionally the 'width' parameter can  
>> be used
>> to set the width of the generated thumbnail (the height is ignored  
>> as it
>> is proportional to width). This works for PNG, JPEG and GIF images --
>> other image types throw an PluginException. E.g.,
>>
>>  [{Image src='attach/ForumPlugin/forum1.png' link='thumbnail'}]
>>
>> This works with relative paths on the server (except those beginning
>> with "..", which is prohibited), as well as external (http:)  
>> references.
>> The generated thumbnails are cached in ./work/thumbnails/.
>>
>> I've tested this and haven't noted any problems with it.
>>
>> If this is approved I'd like to know which branch to submit it to in
>> SVN (e.g., trunk?).
>>
>> Murray
>>
>> ..................................................................... 
>> ......
>> Murray Altheim <murray07 at altheim.com>                            
>> ===  = =
>> http://www.altheim.com/murray/                                      
>> = =  ===
>> SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk                
>> = =  = =
>>
>>      Boundless wind and moon - the eye within eyes,
>>      Inexhaustible heaven and earth - the light beyond light,
>>      The willow dark, the flower bright - ten thousand houses,
>>      Knock at any door - there's one who will respond.
>>                                      -- The Blue Cliff Record


Re: Image thumbnail proposal

Posted by Murray Altheim <mu...@altheim.com>.
Andrew Jaquith wrote:
> Sounds great (seriously!)... but I think it might have to wait until 
> 2.8.1. We need to fix bugs at this point rather than add features. In 
> fact, I think we ought to promote the current Alpha to Beta.

Thanks Andrew,

That's kinda the other half of the question -- if it's approved where
would an appropriate place be? I didn't assume it would keep us from
moving to Beta, which is obviously a higher priority.

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: Image thumbnail proposal

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Agree.  Postpone to 2.8.1.  In the mean time, keep it in your own  
copy.  Also possible to start your own branch (like we've done with  
JSPWIKI_JANNE_BRANCH and JSPWIKI_ARJ_BRANCH.)

Git would be so much better in this regard.

/Janne

On Aug 4, 2008, at 06:30 , Andrew Jaquith wrote:

> Sounds great (seriously!)... but I think it might have to wait  
> until 2.8.1. We need to fix bugs at this point rather than add  
> features. In fact, I think we ought to promote the current Alpha to  
> Beta.
>
> Andrew
>
> On Aug 3, 2008, at 8:55 PM, Murray Altheim wrote:
>
>> Hi,
>>
>> I've got a new proposal to add a thumbnail feature to the Image  
>> plugin.
>> This entails a few changes to the Image plugin and an additional  
>> utility
>> class to generate the thumbnails.
>>
>> Basically, the syntax is augmented such that a value of  
>> "thumbnail" in
>> the 'link' parameter will generate a thumbnail, with the thumbnail a
>> link to the original image. Optionally the 'width' parameter can  
>> be used
>> to set the width of the generated thumbnail (the height is ignored  
>> as it
>> is proportional to width). This works for PNG, JPEG and GIF images --
>> other image types throw an PluginException. E.g.,
>>
>>  [{Image src='attach/ForumPlugin/forum1.png' link='thumbnail'}]
>>
>> This works with relative paths on the server (except those beginning
>> with "..", which is prohibited), as well as external (http:)  
>> references.
>> The generated thumbnails are cached in ./work/thumbnails/.
>>
>> I've tested this and haven't noted any problems with it.
>>
>> If this is approved I'd like to know which branch to submit it to in
>> SVN (e.g., trunk?).
>>
>> Murray
>>
>> ..................................................................... 
>> ......
>> Murray Altheim <murray07 at altheim.com>                            
>> ===  = =
>> http://www.altheim.com/murray/                                      
>> = =  ===
>> SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk                
>> = =  = =
>>
>>      Boundless wind and moon - the eye within eyes,
>>      Inexhaustible heaven and earth - the light beyond light,
>>      The willow dark, the flower bright - ten thousand houses,
>>      Knock at any door - there's one who will respond.
>>                                      -- The Blue Cliff Record


Re: Image thumbnail proposal

Posted by Andrew Jaquith <an...@me.com>.
Sounds great (seriously!)... but I think it might have to wait until  
2.8.1. We need to fix bugs at this point rather than add features. In  
fact, I think we ought to promote the current Alpha to Beta.

Andrew

On Aug 3, 2008, at 8:55 PM, Murray Altheim wrote:

> Hi,
>
> I've got a new proposal to add a thumbnail feature to the Image  
> plugin.
> This entails a few changes to the Image plugin and an additional  
> utility
> class to generate the thumbnails.
>
> Basically, the syntax is augmented such that a value of "thumbnail" in
> the 'link' parameter will generate a thumbnail, with the thumbnail a
> link to the original image. Optionally the 'width' parameter can be  
> used
> to set the width of the generated thumbnail (the height is ignored  
> as it
> is proportional to width). This works for PNG, JPEG and GIF images --
> other image types throw an PluginException. E.g.,
>
>  [{Image src='attach/ForumPlugin/forum1.png' link='thumbnail'}]
>
> This works with relative paths on the server (except those beginning
> with "..", which is prohibited), as well as external (http:)  
> references.
> The generated thumbnails are cached in ./work/thumbnails/.
>
> I've tested this and haven't noted any problems with it.
>
> If this is approved I'd like to know which branch to submit it to in
> SVN (e.g., trunk?).
>
> Murray
>
> ...........................................................................
> Murray Altheim <murray07 at altheim.com>                            
> ===  = =
> http://www.altheim.com/murray/                                     =  
> =  ===
> SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               =  
> =  = =
>
>      Boundless wind and moon - the eye within eyes,
>      Inexhaustible heaven and earth - the light beyond light,
>      The willow dark, the flower bright - ten thousand houses,
>      Knock at any door - there's one who will respond.
>                                      -- The Blue Cliff Record