FabricJS Articles

Page 6 of 51

How to crop the height in a cloned image using FabricJS?

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

In this tutorial, we are going to learn how to crop the height 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 crop the height in a cloned image, we use the height property. Syntax cloneAsImage(callback: function, {height: Number}: Object): fabric.Object Parameters callback (optional) − This parameter is a function which is to be invoked ...

Read More

How to crop the top offset in a cloned image using FabricJS?

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

In this tutorial, we are going to learn how to crop the top offset 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 crop the top offset in a cloned image, we use the top property. Syntax cloneAsImage( callback: function, { top: Number}: Object): fabric.Object Parameters callback (optional) − This parameter is a function which ...

Read More

How to crop the width in a cloned image using FabricJS?

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

In this tutorial, we are going to learn how to crop the width 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 crop the width in a cloned image, we use the width property with the cloneAsImage method. Syntax cloneAsImage(callback: function, options: Object): fabric.Object Parameters callback (optional) − This parameter is a function which is ...

Read More

How to disable multiple specific control points of Image object using FabricJS?

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

In this tutorial, we are going to learn how to disable multiple specific control points 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 disable multiple specific control points of an Image object, we use the setControlsVisibility method. Syntax setControlsVisibility(options: Object): fabric.Object Parameters options − This parameter accepts ...

Read More

How to enable retina scaling for cloned image using FabricJS?

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

In this tutorial, we are going to learn how to enable retina scaling for 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 enable retina scaling for a cloned image, we use the enableRetinaScaling property. In this case, the clone image is scaled up by the devicePixelRatio for better rendering on retina screens. There will be no change on the appearance of the image. Syntax ...

Read More

How to find the complexity of an Image instance using FabricJS?

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

In this tutorial, we are going to learn how to find the complexity of an Image instance 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 complexity of an Image instance, we use the complexity method. This method will return 1 if the current object is directly inherited from a base class and not from a subclass. Syntax complexity(): Number Using the ...

Read More

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 848 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
Showing 51–60 of 506 articles
« Prev 1 4 5 6 7 8 51 Next »
Advertisements