当前位置: 首页>>代码示例>>Python>>正文


Python Importer.filters方法代码示例

本文整理汇总了Python中thumbor.importer.Importer.filters方法的典型用法代码示例。如果您正苦于以下问题:Python Importer.filters方法的具体用法?Python Importer.filters怎么用?Python Importer.filters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thumbor.importer.Importer的用法示例。


在下文中一共展示了Importer.filters方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_context

# 需要导入模块: from thumbor.importer import Importer [as 别名]
# 或者: from thumbor.importer.Importer import filters [as 别名]
def get_context():
    conf = Config()
    conf.ENGINE = "thumbor.engines.pil"
    imp = Importer(conf)
    imp.import_modules()
    imp.filters = [Filter]
    return Context(None, conf, imp)
开发者ID:expertise-com,项目名称:thumbor,代码行数:9,代码来源:fill_filter_vows.py

示例2: topic

# 需要导入模块: from thumbor.importer import Importer [as 别名]
# 或者: from thumbor.importer.Importer import filters [as 别名]
 def topic(self):
     conf = Config()
     conf.ENGINE = 'thumbor.engines.pil'
     imp = Importer(conf)
     imp.import_modules()
     imp.filters = [Filter]
     return Context(None, conf, imp)
开发者ID:achellies,项目名称:thumbor,代码行数:9,代码来源:fill_filter_vows.py

示例3: setUp

# 需要导入模块: from thumbor.importer import Importer [as 别名]
# 或者: from thumbor.importer.Importer import filters [as 别名]
 def setUp(self, *args, **kwargs):
     super(FakeRotateEngineRotateFilterTestCase, self).setUp(*args, **kwargs)
     conf = Config()
     imp = Importer(conf)
     imp.filters = [Filter]
     self.context = Context(None, conf, imp)
     self.context.request = RequestParameters()
开发者ID:gi11es,项目名称:thumbor,代码行数:9,代码来源:test_rotate.py

示例4: topic

# 需要导入模块: from thumbor.importer import Importer [as 别名]
# 或者: from thumbor.importer.Importer import filters [as 别名]
        def topic(self):
            conf = Config()
            imp = Importer(conf)
            imp.filters = [Filter]
            ctx = Context(None, conf, imp)
            ctx.request = RequestParameters()

            filter_instances = ctx.filters_factory.create_instances(ctx, "format(invalid)")

            filter_instances[0].run()
开发者ID:Hazer,项目名称:thumbor,代码行数:12,代码来源:format_filter_vows.py

示例5: topic

# 需要导入模块: from thumbor.importer import Importer [as 别名]
# 或者: from thumbor.importer.Importer import filters [as 别名]
        def topic(self):
            conf = Config()
            imp = Importer(conf)
            imp.filters = [Filter]
            ctx = Context(None, conf, imp)
            ctx.request = RequestParameters()

            runner = ctx.filters_factory.create_instances(ctx, "format(invalid)")
            filter_instances = runner.filter_instances[thumbor.filters.PHASE_POST_TRANSFORM]

            filter_instances[0].run()
开发者ID:APSL,项目名称:thumbor,代码行数:13,代码来源:format_filter_vows.py

示例6: topic

# 需要导入模块: from thumbor.importer import Importer [as 别名]
# 或者: from thumbor.importer.Importer import filters [as 别名]
        def topic(self):
            conf = Config()
            imp = Importer(conf)
            imp.filters = [Filter]
            ctx = Context(None, conf, imp)
            ctx.request = RequestParameters()

            runner = ctx.filters_factory.create_instances(ctx, "rotate(540)")
            filter_instances = runner.filter_instances[thumbor.filters.PHASE_POST_TRANSFORM]

            filter_instances[0].engine = RotateEngine()
            filter_instances[0].run()

            return filter_instances[0].engine.rotate_val
开发者ID:APSL,项目名称:thumbor,代码行数:16,代码来源:rotate_filter_vows.py

示例7: topic

# 需要导入模块: from thumbor.importer import Importer [as 别名]
# 或者: from thumbor.importer.Importer import filters [as 别名]
    def topic(self):
        conf = Config()
        conf.ENGINE = 'thumbor.engines.pil'
        imp = Importer(conf)
        imp.import_modules()
        imp.filters = [Filter]
        ctx = Context(None, conf, imp)

        for item in DATA:
            ctx.modules.engine.image = ctx.modules.engine.gen_image(item[1],'#fff')
            req = RequestParameters(fit_in=True,width=item[0][0],height=item[0][1])
            ctx.request = req

            filter_instances = ctx.filters_factory.create_instances(ctx, "fill(blue)")

            filter_instances[0].run()
            yield (filter_instances[0].engine.image.size,item[2])
开发者ID:amumu,项目名称:thumbor,代码行数:19,代码来源:fill_filter_vows.py


注:本文中的thumbor.importer.Importer.filters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。