This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 56 - Pages: 4 [ Previous | 1 2 3 4 | Next ] - Last Post: 26-Mar-2017 15:16 Last Post By: jimberry
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Where is the crop focus tool for a thumbnail??
Posted: 18-Mar-2017 16:55   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Attachment PanPlugin.zip (26.2 KB)
Attachment Netbeans.PNG (121.4 KB)
davidekholm wrote:
If I give you the source code for this "simple plugin", then you're not the one implementing it, but I, right? ;-)
OK, I stripped and modified your CropFocusPlugin to my new simple PanPlugin, but I have 2 problems ( see Netbeans screendump)

1. I changed your package name into
package net.jalbum.pan;
but I get the yellow hint 'Incorrect package'.

2. I get next compile error:
Compiling 1 source file to D:\Users\Andre\Documents\NetBeansProjects\PanPlugin\build\classes
Note: D:\Users\Andre\Documents\NetBeansProjects\PanPlugin\src\PanPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Please tell me how I should solve this.

The source PanPlugin is in the attached zip file.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 18-Mar-2017 23:42   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
OK, I stripped and modified your CropFocusPlugin to my new simple PanPlugin, but I have 2 problems ( see Netbeans screendump)

1. I changed your package name into
package net.jalbum.pan;
but I get the yellow hint 'Incorrect package'.

2. I get next compile error:
Compiling 1 source file to D:\Users\Andre\Documents\NetBeansProjects\PanPlugin\build\classes
Note: D:\Users\Andre\Documents\NetBeansProjects\PanPlugin\src\PanPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Please tell me how I should solve this.

Open panPlugin.java in Netbeans.
Click on line 14.
Press Alt/Opt + ENTER
Select move package to correct folder.
Rebuild.
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Where is the crop focus tool for a thumbnail??
Posted: 19-Mar-2017 12:53   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Open panPlugin.java in Netbeans.
Click on line 14.
Press Alt/Opt + ENTER
Select move package to correct folder.
Rebuild.
Thanks Rob, that solves the package problem, but I still get next message:
Compiling 1 source file to D:\Users\Andre\Documents\NetBeansProjects\PanPlugin\build\classes
Note: D:\Users\Andre\Documents\NetBeansProjects\PanPlugin\src\net\jalbum\pan\PanPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Can I solve this or should I ignore this?

Edited by: AndreWolff on 19-Mar-2017 12:59:

I moved files PanPlugin.java and PanPluggin.class to C:\Program Files\jAlbum\plugins and started jAlbum.
I did expect to see a new entry in the right mouse pop-up menu item 'Extensions' of a thumbnail, but I see nn new item, only the 5 standard items. Should I do more or is it caused by the reported note above?

Edited by: AndreWolff on 19-Mar-2017 13:07:

I renamed PanPlugin.jar into PanPlugin.jaext copied it to the jAlbum ext folder and started jAlbum. Now all entries in the right mouse pop-up menu item 'Extensions' of a thumbnail are disappeared!!
davidekholm

Posts: 3,658
Registered: 18-Oct-2002
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 15:19   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Attachment PanPlugin 2.zip (41.0 KB)
All works here (attached zip of project)
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 19:12   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
All works here (attached zip of project)
Yes thanks David!

I copied file PanPlugin.jar to the jAlbum ext directory started jAlbum and I could use it! Apparently it is not required to change the file extension in jaext.
I have no idea what you changed, because I see no differences in the source file PanPlugin.java
The texts were in the wrong folder, but I could correct this.

Now I am looking for the next step: I like to distribute this plugin with a new version of my skin in such a way that the user sees the new item 'Maximize Panorama image width' under 'Extensions'.
So I removed file PanPlugin.jar again and added a folder plugins to the skin and dropped files PanPlugin.java and PanPlugin.class into that folder.
Next I started jAlbum and selected an album made with my skin, but there was no new item 'Maximize Panorama image width' under 'Extensions'.

I guess I have to call something in init.bsh, but I can't find a hint on the form to do that.
So please give me the line of code to reach my goal.

Edited by: AndreWolff on 20-Mar-2017 19:25:

I found a tip here: http://jalbum.net/forum/thread.jspa?messageID=215113&#215113

So I added to init.bsh this code:
import se.datadosen.jalbum.*;
JAlbumPlugin PanPlugin = new SkinPlugin();
PanPlugin.init(context.getPluginContext());


Next I made a jaskin file, removed the skin and installed it again via the jaskin file, but after I started jAlbum, there was no new item 'Maximize Panorama image width' under 'Extensions'.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 21:36   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
David, I played with the cropFocus plugin and came up with a plugin that lets you specify the image bounds rather than just applying a fixed maximum image width. It is posted here
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 23:02   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Well Rob, I tested quickly your posted plugin and with the changes suggested below I could use it, so thanks for your work!

I have 3 remarks:

1. I think you did give it the wrong extension name: instead of 'Set Slide image size' the title should be 'Set Slide maximum image size' and on the form the text should also be 'Maximum width/height'.

2. It is for me only usefully if it remembers the settings set in the previous slide.

3. Why is the maximum size 10000 and not 30000?

And if David is not willing to include your plugin in the next release, could you tell me how I could distribute this plugin with a skin, so what is the required code in init.bsh?
jGromit

Posts: 7,661
Registered: 31-Jan-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 23:05   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Andre, init.bsh ≠ onload.bsh.
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 23:07   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Andre, init.bsh ≠ onload.bsh.
Do you mean the extra could should be inserted in onload.bsh?
No problem, but what is the code?
jGromit

Posts: 7,661
Registered: 31-Jan-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 23:13   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
You really don't know the difference? The init.bsh code is executed when you click Make Album. Were you unaware of this? And what possible good could it do to install a plugin only when an album is being made? Isn't that a little late?

You could install the plugin via onload.bsh, but think this through - do you really want to do that every friggin' time the skin is loaded?

At present, there's no good way to distribute a plugin with a skin. The best you can do is hope that it's added to the jAlbum core, or post it here and tell your users to install it.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 23:34   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
Well Rob, I tested quickly your posted plugin and with the changes suggested below I could use it, so thanks for your work!

I have 3 remarks:

1. I think you did give it the wrong extension name: instead of 'Set Slide image size' the title should be 'Set Slide maximum image size' and on the form the text should also be 'Maximum width/height'.

2. It is for me only usefully if it remembers the settings set in the previous slide.

3. Why is the maximum size 10000 and not 30000?

And if David is not willing to include your plugin in the next release, could you tell me how I could distribute this plugin with a skin, so what is the required code in init.bsh?

1. Does it really matter what the title is, the instructions make clear what it does. But if you to make your own version just make the changes in NetBeans project (just added) and build your own version.

2. Given that all you wanted was for maxImageWidth to be set to 3000 why not simply change the default value from 1000 to 3000? The intention was to make the plugin more flexible than what you wanted, so I'm not sure if it is a good idea to pick up the last used setting.

3. Why not? 4K and 5K images are not uncommon.

And. The plugin and the NetBeans project (just added) is in the External Tools & Extensions forum, so anyone can download and install it if they want it - there is no need for it to be included. Just add a note to your skin page telling users they can add it if they want.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 23:37   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
At present, there's no good way to distribute a plugin with a skin. The best you can do is hope that it's added to the jAlbum core, or post it here and tell your users to install it.
Or better still post it in the Tools & plugins forum so users can easily find them - and isn't it better to share your plugins with the community rather than building it in to a single skin.
jGromit

Posts: 7,661
Registered: 31-Jan-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 20-Mar-2017 23:48   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Or better still post it in the Tools & plugins forum so users can easily find them - and isn't it better to share your plugins with the community rather than building it in to a single skin.

Oh, you foolish fellow. Don't you understand that no user needs any skin other than one from AndreWolff? His skins do everything. Perfectly. It's a mystery why anyone uses anything else.
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Where is the crop focus tool for a thumbnail??
Posted: 21-Mar-2017 08:55   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
2. Given that all you wanted was for maxImageWidth to be set to 3000 why not simply change the default value from 1000 to 3000? The intention was to make the plugin more flexible than what you wanted, so I'm not sure if it is a good idea to pick up the last used setting.
For panoramas I like to use only the user variable maxImageWidth=30000 and no value for maxImageHeight, because in that case I have to change all panorama settings again if I change the slide image bounds on the Images/General tab.

So, instead of two Jspinner fields I would propose to use two JnumberFields, because you can leave these fields empty. If a field is empty it means that the corresponding user variable should not be used.
And. The plugin and the NetBeans project (just added) is in the External Tools & Extensions forum, so anyone can download and install it if they want it - there is no need for it to be included. Just add a note to your skin page telling users they can add it if they want.
I don't think all users are familiar with this forum and some users are afraid to changes something in the Program files directory. The best solutions is that David it adds to the jAlbum program.
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Where is the crop focus tool for a thumbnail??
Posted: 21-Mar-2017 09:08   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
and isn't it better to share your plugins with the community rather than building it in to a single skin.
I agree, but not all users are searching for these items in this forum and some users are not prepared to change something in the Program files directory, so the best solutions is that David adds it to the jAlbum program.
That is the reason I did ask for this function 2 years ago as a feature request. I am glad that David did help me this time to make the PanPlugin!

You can download the PanPlugin here, but I hope David will add this to the jAlbum program.

Edited by: AndreWolff on 21-Mar-2017 10:01
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums