Plugins work in Photogrok version 2.65 or higher. Previous sample scripts still work and can be found
here.
A plugin is a JS program that can interact with other plugins and PhotoGrok. More detailed documentation is on the way but you can view the code here and use the examples to create your own plugins. You can auto-load these plugins by pasting the following three lines into the script editor (you must adjust the paths for your installation):
load('path_to_defaults.js');
var ds = new DefaultSetup('path_to_plugins_directory');
ds.init();
NOTE: Fresh installs of PhotoGrok now create this code for you. Comment out or delete the added lines if you do not want to run any plugins. You can also edit default.js to load only the plugins you want.
Many of these example plugins create menu items in PhotoGrok. Either top-level "User" menu items or pop-up menu items from right-clicking on photos or tree nodes. The plugins provide simple help dialogs which can be found in the PhotoGrok "Help" menu. Painters and filters are display only and do not alter your saved images. You can try these individually by pasting the source into the script editor. You may also need util.js for some plugins to work.
- defaults.js This is the auto-loader for these example plugin scripts.
- util.js Utility code allowing plugins to work together. Should always be loaded first.
- effectivestops.js Thumbnail filter that graphically displays 1/FocalLength shutter speed rule.
- filler.js Fill unused portion of screen with magnified/blurred image. Just like on TV.
- findintree.js Search the tree for specific text. Also adds "Find Next" and "Find Previous" to user menu.
- fixtime.js Adjust timestamps in images in hour increments.
- gps.js Add menu items to copy and add gps coordinates to selected images.
- gpsthumbnails.js Display compass icon on thumbnail screen for images with GPS data. Works with other plugin thumbnail painters.
- histogram.js Draws a histogram of the visible part of an image. Zoom in and drag!
- iso.js Prompts for an ISO value and the builds a corresponding tree from the catalog.
- jhlabs.js Use included JHLabs filters to view your images with various effects.
- painterlinker.js Allows multiple painters to be applied in sequence. Try filler.js with histogram.js. Use with transparent painters.
- previewer.js Stylize the rollover popup image with a custom filter and tags.
- psych.js Psychedelic painter that changes whenever there's a repaint event.
- refreshmenuitem.js Adds a popup menu command to refresh an image in the catalog.
- reset.js Adds user menu items to turn off any painters applied to the main or thumbnail screens.
- tone.js Creates a dialog to control brightness, contrast, highlights and shadows. Algorithms by chatGPT. Requires PhotoGrok 2.70 and above.
- film.js Film simulations created by chatGPT.
- sizer.js Calculate and display tree, node or file sizes. Requires 2.71 if using graal.js.
- framer.js Change the color of the thumbnail frame based on tag values. See Help->Plugins->framer.
- squint.js Interactive ascii art filter. Try different fonts, sizes and characters and see the results in real time!
- anim.js Animation demo using Timer and JHLabs filter changes.
A plugin object can typically be accessed by it's name from other scripts. Functions that can be called should be documented in the help dialog for that plugin. For example, to change the default painter used by the Filler plugin to the psychedelic painter from the Psych plugin, enter the following via CTRL+SHIFT+J or CTRL+SHIFT+E (don't forget to activate the Filler plugin from the menu):
Filler.setFillerPainter(Psych.getPainter());
Expect updated plugins to be added over time. Let me know if you develop a plugin you would like to see added to this list.