I could do with some help to understand what fabric means by: Max Texture Size: 16,384 - 16,384 what? The image i used is 5MP (2560 x 1920) and trying to apply a filter to the image like this:
object.filters.push(new fabric.Image.filters.Sepia());
object.applyFilters();
The image object disappears and the message above appears in the console. I can only seem to apply filters to the image if it's < 2MP which isn't ideal at all. I really don't know what it means by a max texture size.
So what does this mean and how can i make it allow the filters on bigger sized images?
You can set Fabric's alotted textureSize based on the max textureSize detected for a user's machine by running:
if (fabric.isWebglSupported()) {
fabric.textureSize = fabric.maxTextureSize;
}
Note that running fabric.isWebglSupported() seems to be necessary to compute fabric.maxTextureSize. Otherwise, it will return undefined.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With