How to use the getnative.utils.plugin_from_identifier function in getnative

To help you get started, we’ve selected a few getnative examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Infiziert90 / getnative / getnative / app.py View on Github external
def __init__(self, kernel: str, b: Union[float, int] = 0, c: Union[float, int] = 0, taps: int = 0):
        """
        Get a scaler for getnative from descale

        :param kernel: kernel for descale
        :param b: b value for kernel "bicubic" (default 0)
        :param c: c value for kernel "bicubic" (default 0)
        :param taps: taps value for kernel "lanczos" (default 0)
        """

        self.kernel = kernel
        self.b = b
        self.c = c
        self.taps = taps
        _d = plugin_from_identifier(core, "tegaf.asi.xe")
        self.plugin = _d if _d is not None else get_attr(core, 'descale', None)
        if self.plugin is None:
            return

        self.descaler = getattr(self.plugin, f'De{self.kernel}', None)
        self.upscaler = getattr(core.resize, self.kernel.title())

        self.check_input()
        self.check_for_extra_paras()

getnative

Find the native resolution(s) of upscaled material (mostly anime)

MIT
Latest version published 2 years ago

Package Health Score

42 / 100
Full package analysis

Similar packages