Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Remove the need for config.textureSize #10197

Open
4 tasks done
miroljub1995 opened this issue Oct 8, 2024 · 1 comment
Open
4 tasks done

[Feature]: Remove the need for config.textureSize #10197

miroljub1995 opened this issue Oct 8, 2024 · 1 comment

Comments

@miroljub1995
Copy link
Contributor

CheckList

  • I agree to follow this project's Code of Conduct
  • I have read and followed the Contributing Guide
  • I have searched and referenced existing issues, feature requests and discussions
  • I am filing a FEATURE request.

Description

Is it possible to detect textureSize based on dimensions of max image used. Currently we do not know what value to set for textureSize, instead, we have something like:

  applyFilters(filters?: BaseFilter<string, Record<string, any>>[]): void {
    const neededTextureSize = Math.max(this.width, this.height);

    if (config.textureSize < neededTextureSize) {
      config.textureSize = neededTextureSize;
      setFilterBackend(initFilterBackend());
    }

    super.applyFilters(filters);
  }

Do we really need this property in config, can something similar be implemented in fabric so that we do not have to extend FabricImage class?

Current State

Currently we need to set textureSize to some big enough value to support all images.

Additional Context

No response

@asturur
Copy link
Member

asturur commented Oct 9, 2024

The issue with maxTextureSize is that some hardware declare 16k and then will just break at 8k or less. ( intel integrated graphics of some years ago ). Just set it to 16k if you think all your users have modern gpus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants