<s> from thumbor . filters import BaseFilter , filter_method <EOL> from thumbor . ext . filters import _convolution <EOL> class Filter ( BaseFilter ) : <EOL> """<STR_LIT>""" <EOL> @ filter_method ( r'<STR_LIT>' , BaseFilter . PositiveNumber , BaseFilter . Boolean ) <EOL> def convolution ( self , matrix , columns , should_normalize = True ) : <EOL> matrix = tuple ( matrix . split ( '<STR_LIT:;>' ) ) <EOL> mode , data = self . engine . image_data_as_rgb ( ) <EOL> imgdata = _convolution . apply ( mode , data , self . engine . size [ <NUM_LIT:0> ] , self . engine . size [ <NUM_LIT:1> ] , matrix , columns , should_normalize ) <EOL> self . engine . set_image_data ( imgdata ) </s>
