Node.js GM lower() Function
Last Updated :
31 Mar, 2023
The lower() function is an inbuilt function in the GraphicsMagick library which is used to create a pseudo-3D lowering effect of the image edges. The function returns the true value on success.
Syntax:
lower(width, height)
Parameters: This function accepts two parameters as mentioned above and described below:
- width: This parameter is used to specify the width from which the image is to be lowered.
- height: This parameter is used to specify the height from which the image is to be lowered.
Return Value: This function returns the GraphicsMagick object.
Example 1:
javascript
const gm = require( 'gm' );
gm( '1.png' )
.lower(45, 78)
.write("lower1.png", function (err) {
if (!err) console.log( 'done' );
});
|
Output:
Example 2:
javascript
const gm = require( 'gm' );
gm(600, 300, 'white' )
.stroke("green", 3)
.font("Helvetica.ttf", 60)
.drawText(100, 280, "GeeksforGeeks!")
.borderColor("Green")
.border(62, 32)
.lower(13, 56)
.write("lower2.png", function (err) {
if (!err) console.log( 'done' );
});
|
Output:
Reference:
Share your thoughts in the comments
Please Login to comment...