Javascript Articles

Page 50 of 534

How to find the original size of an Image using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 1K+ Views

In this tutorial, we are going to learn how to find the original size of an Image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to find the original size of an Image, we use the getOriginalSize method. Syntax getOriginalSize(): Object Return Value The method returns an object containing the width and height of the original image in pixels: { ...

Read More

FabricJS – How to find the real center coordinates of an Image object?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 850 Views

In this tutorial, we are going to learn how to find the real center coordinates of an Image object using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to find the real center coordinates of an Image object, we use the getCenterPoint method. Syntax getCenterPoint(): fabric.Point Using getCenterPoint Method Let's see a code example to see the logged output when the getCenterPoint method is ...

Read More

How to get the object scale factor of Image using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 236 Views

In this tutorial, we are going to learn how to get the object scale factor of Image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to get the object scale factor of Image, we use the getObjectScaling method. Syntax getObjectScaling(): Object Parameters The getObjectScaling method does not take any parameters. Return Value This method returns an object containing the scale factors: ...

Read More

How to get the opacity of Image object using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 375 Views

In this tutorial, we are going to learn how to get the opacity of Image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to get the opacity of Image, we use the getObjectOpacity method. Syntax getObjectOpacity(): Number Parameters This method takes no parameters and returns the current opacity value as a Number between 0 and 1. Using the getObjectOpacity Method Let's ...

Read More

FabricJS – How to get the position of Image object with respect to origin?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 2K+ Views

In this tutorial, we are going to learn how to get the position of Image object with respect to origin using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to get the position of Image object with respect to origin, we use the getPointByOrigin method. Syntax getPointByOrigin(originX: String, originY: String): fabric.Point Parameters originX − This parameter accepts a String ...

Read More

How to identify the type of an Image instance using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 358 Views

In this tutorial, we are going to learn how to identify the type of an Image instance in FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to identify the type of an Image instance, we use the isType method. Syntax isType(type: String): Boolean Parameters type − This parameter accepts a String which specifies the type we want to check. ...

Read More

FabricJS – How to remove the current object shadow in a cloned image?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 534 Views

In this tutorial, we are going to learn how to remove the current object shadow in a cloned image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to remove the current object shadow in a cloned image, we use the withoutShadow property. Syntax cloneAsImage( callback: function, { withoutShadow: Boolean }: Object): fabric.Object Parameters callback (optional) − This parameter ...

Read More

FabricJS – How to remove the current object transform in a cloned image?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 495 Views

In this tutorial, we are going to learn how to remove the current object transform (scale, angle, flip and skew) in a cloned image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to remove the current object transform in a cloned image, we use the withoutTransform property. Syntax cloneAsImage(callback: function, { withoutTransform: Boolean }: Object): fabric.Object Parameters callback (optional) − This parameter ...

Read More

FabricJS – How to scale an image equally on horizontal and vertical directions?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 458 Views

In this tutorial, we are going to learn how to scale an image equally on horizontal and vertical directions using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to scale an image equally on horizontal and vertical directions, we use the scale method. Syntax scale(value: Number): fabric.Object Parameters value − This parameter accepts a Number which sets the scale factor ...

Read More

FabricJS – How to scale an Image object to a given height?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 960 Views

In this tutorial, we are going to learn how to scale an Image object to a given height using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to scale an Image object to a given height, we use the scaleToHeight method. Syntax scaleToHeight(value: Number, absolute: Boolean): fabric.Object Parameters value − This parameter accepts a Number which determines ...

Read More
Showing 491–500 of 5,340 articles
« Prev 1 48 49 50 51 52 534 Next »
Advertisements