Property 'filters' Undefined on 'FabricImage' in Fabric.js 6.3.0 for Angular Project #10105
-
Previously, when I was using Fabric.js version 5.3.0, the following code worked perfectly for applying a brightness filter to an image. I was passing a value between 0 and 1:
Now, I've upgraded to version 6.3.0 and would like to apply the same filter logic. However, when I try to use the following code, I encounter an error:
Here’s how I’m importing Canvas and FabricImage in my Angular 18.2.0 project: import { FabricImage, Canvas } from 'fabric'; Due to project constraints, I am unable to change the Angular version I’m working with. Could you please guide me on what changes are needed to make this code work with Fabric.js 6.3.0? Your assistance would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I do not think Angular has nothing to do with it.
And while i m leaving that on, i ll make a PR so that you can do |
Beta Was this translation helpful? Give feedback.
I do not think Angular has nothing to do with it.
filters is its own export.
You can do
And while i m leaving that on, i ll make a PR so that you can do
import { Brightness } from 'fabric';
so that is more clear.Those bundles of objects are not useful