Hi everyone, how is it going? Fine, I hope.
Today, I will talk about my work on Krita during the week 3-4 of the coding period.
Overview
I implemented two new plugins, canvas size plugin and filter manager (applier) plugin. The first is a plugin to change image size (not scale) and to adjust the top and left edge to selected documents also. The second is a filter applier to the document or nodes, then you can select a node or the document and apply a filter to them.
Canvas Size Plugin
GUI Mockup
I drew a simple mockup to define some direction for my implementation. As you can see, it's something close to the current implementation, but without a canvas preview, we have a list of the opened documents, though.
C++ and SIP implementation
I have to provide offset properties (xOffset, yOffset) to document API and a updating to the resizeImage method to include the new parameters. I implemented these properties and your respective SIP signatures. I also wrote documentation to each method implemented in .h files. Click here to take a look.
GUI implementation with PyQt
At the end, I implemented the GUI and all your interactions and validations. How you can see below, we have a confirm button that resizes the image to selected documents.
Testing
Below, you can see the plugin working.
Before | After |
---|---|
Filter Manager Plugin
GUI Mockup
I didn't draw a GUI mockup, but the main idea here is to have a tree showing documents and your nodes and a list of the application's filters.
C++ and SIP implementation
I don't changed the C++ code, I fixed some bugs in the API, though.
GUI implementation with PyQt
You can see below the final result of my work. The tree was implemented using Model-View pattern. You can apply filters from the list to specific node or to all document (all top level nodes).
Testing
Below, you can see the image before and after the application of the "desaturate" filter.
Before | After |
---|---|
What will I do in the next week?
- Simple scripts of the previous plugins
- Plugin to take a list of images (inputted list) and apply rotate/scale
- Script to export all the layers (batch)
- Script to Duplicate image
- Script to Export to jpg X% quality.
That’s it for now, until the next week. See ya!!