[]
Paint tools are a set of tools or functions used to change the area of the canvas or image by adding paint strokes or fine lines in different colors and thicknesses. DsImageViewer provides PaintToolsPlugin that adds the Paint Tools button to the toolbar. The Paint Tool button opens the secondary toolbar containing the Paint tools that allow you to draw or paint on an image.
DsImageViewer also provides some useful tools, such as the Clone Stamp tool to copy pixels from the selected area to another area and the Select tool to select a region to either draw, copy, or cut for further use.
The following table lists the options available in the Paint Tools secondary toolbar:
Icon | Name | Description |
---|---|---|
Rectangular Marquee Tool | The Rectangular Marquee tool makes square and rectangular selections. You can also resize the selections after making them. | |
Lasso Tool | The Lasso tool allows you to draw freehand selections. | |
Elliptical Marquee Tool | The Elliptical Marquee tool makes round and elliptical selections. You can also resize the selections after making them. | |
Polygonal Lasso Tool | The Polygonal Lasso tool allows you to draw polygonal, jagged selections. | |
Pencil | The Pencil tool draws shapes and unrestricted curves without anti-aliasing. | |
Brush | The Brush tool paints artistic strokes with fluidity and precision, simulating the qualities of a traditional paintbrush. It creates smoother lines due to blurred edges and anti-aliasing. | |
Clone Stamp | The Clone Stamp tool copies the pixels from the selected area to another area. | |
Eraser | The Eraser tool removes the drawing drawn by the Pencil or Brush tool when the Use Original Image toggle button is Off. It also helps remove a part of the original image when the Use Original Image toggle button is On. | |
Size | The Size dropdown allows you to choose the thickness, hardness, and opacity of the line. | |
Color | The Color dropdown allows you to choose the color of the pencil or brush used to draw the line. | |
Use Original Image | The Use Original Image toggle button allows you to use the original image, combined with your recent edits, as a background source for new edits. It allows you to erase both the new edits and the background when enabled and only the new edits when disabled. And it also allows you to clone a part of the original image with the new edits when enabled and only the new edits when disabled. | |
Undo | The Undo button reverts the image to its state before the last change. | |
Redo | The Redo button changes the image to its state after the last change. | |
Apply | The Apply button accepts all the changes and applies to the image. | |
Cancel | The Cancel button discards all the changes and reverts the image to its original state. |
Note: For more information on adding PaintToolsPlugin to DsImageViewer toolbar, refer to Using Plug-ins.
Refer to the following sections for more information on all the above-mentioned functionalities:
DsImageViewer provides four different types of selection tools in PaintToolsPlugin, which are present in the Selection Tools button located at the secondary Paint Tools toolbar. The Selection Tools button opens a drop-down menu containing Rectangular Marquee Tool, Lasso Tool, Elliptical Marquee Tool, and Polygonal Lasso Tool. These selection tools allow you to select a specific region in an image and use this region either to draw a desired shape or graphic inside the region or to cut or copy this region and paste it in the desired location.
Select the desired selection tool from the Selection Tools drop-down button.
Outline or select the region where you want to paint using the selection tool. This will create a mask for the selected region.
Select any Paint Tool to draw or paint inside the selected region, where the paint or draw operation will be limited to the selected region.
Select the desired tool from the Selection Tools drop-down button.
Outline or select the region that you want to copy or cut.
Copy or cut the selected region using the keyboard shortcuts.
Note: You can use the following keyboard shortcuts to copy, cut, and paste:
Copy: Ctrl+C for Windows and Cmd+C for MacOS
Cut: Ctrl+X for Windows and Cmd+X for MacOS
Paste: Ctrl+V for Windows and Cmd+V for MacOS
The selected region gets pasted in the top-left corner using the keyboard shortcut. You can then adjust the pasted region by dragging it with the mouse and placing it at your desired location.
With DsImageViewer's Paint Tools, you can draw or paint lines on an image using the Pencil () or Brush () tools. The Pencil and Brush tools function the same; the only difference is that the Brush tool creates smoother lines due to the blurred edges and anti-aliasing.
Refer to the GIF image to draw or paint on an image using the Pencil and Brush tools:
The Clone Stamp () tool in DsImageViewer copies pixels from one area and pastes them into another. It works the same as copying and pasting text, but you paste the content by painting it in an image. The Clone Stamp tool is most useful when you need to copy the same pixels from one area of an image to another.
To copy pixels from one area of an image to another:
Select the Clone Stamp tool from the secondary toolbar.
Toggle the Use Original Image button to ON.
Adjust the area size and choose the source area by holding the Alt key and clicking on the area of the image you need to clone.
Note: You need to press the Option key instead of Alt on Mac devices, and for mobile devices without keyboards, the first tap will define the source area.
Position the cursor over the area where you want to apply the cloned pixels.
Click and paint over the target area.
Continue painting and adjusting the source area as needed.
After finishing painting, release the mouse button and review the cloned effect.
Limitations
DsImageViewer does not support editing images with animation or multi-frame images. The following is a list of uneditable image formats:
GIF
ICO
SVG
TIFF