Lobster Plugins of Lobster Version 1.0


Lobster Plugins are the filters which are not the predefined filters of the Lobster application but still can use features and complete 'Interface' of the Lobster application.Users are expected to write the code for the plugin that the Lobster application will execute.Because Lobster application created using the Java Language,Lobster application will be able to understand code written in Java Language only.But the advantage of using the Lobster Plugins is that the user can create any filter which is not the predefined filters of the Lobster application and still use the features like QRGB,Pattern Filtering,Filter Style,Gradients,Edit Modes,3D Effect,Dynamic Filtering Panel,Drawing Panel,Brush Panel etc.Even the complete 'Interface' of the Lobster application will be available to the user and will be able to include or exclude any features of the Lobster application while applying the plugin to the image.Even the user will be able to create macros from such plugins proves how much powerful implementation of the plugins is in the Lobster application.

Following code is the template which can be used by the user to create any number of plugins to be loaded by the Lobster application :-

public class [PluginName] extends PluginFilter1
{
public int[] applyFilter(int[] imageArray,int width,int height)
{
//create the filter
//if image object then imageArray=img.getRGB(0,0,width,height,0,imageArray);
return imageArray;
}
}

Following the code for Interface PluginFilter1 :-

public class PluginFilter1
{
int[] applyFilter(int[] imageArray,int width,int height);
}

User is expected to place the class files of such plugins in the 'Plugins' directory which the Lobster application will load while opening the Lobster application.Rest of the functionality of facilitating the features and 'Interface' will be implemented by the Lobster application.If the plugin fails for some reason then Lobster application will not apply the plugin and image in the canvas will remain unchanged.

Following snapshot shows the 'Inverted Grayscale' plugin applied to the image even if it is not the predefined filter of the Lobster application.

Following snapshot shows the 'Inverted Grayscale' plugin applied the 'Rectangular Gradient' even though 'Inverted Grayscale' is not the predefined filter of the Lobster application.