This file is indexed.

/usr/share/phatch/phatch/actions/minimum.py is in phatch-cli 0.2.7.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Phatch - Photo Batch Processor
# Copyright (C) 2007-2008 www.stani.be
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see http://www.gnu.org/licenses/
#
# Phatch recommends SPE (http://pythonide.stani.be) for editing python files.

# Embedded icon is taken from www.openclipart.org (public domain)

# Follows PEP8

from core import models
from lib.reverse_translation import _t

#---PIL


def init():
    global Image, ImageFilter, imtools
    import Image
    import ImageFilter
    from lib import imtools


def minimum(image, radius, amount=100):
    """Apply a filter
    - amount: 0-1"""
    image = imtools.convert_safe_mode(image)
    minimumed = image.filter(ImageFilter.MinFilter(radius))
    if amount < 100:
        return imtools.blend(image, minimumed, amount / 100.0)
    return minimumed

#---Phatch


class Action(models.Action):
    """"""

    label = _t('Minimum')
    author = 'Stani'
    email = 'spe.stani.be@gmail.com'
    init = staticmethod(init)
    pil = staticmethod(minimum)
    version = '0.1'
    tags = [_t('filter')]
    __doc__ = _t("Copies the minimum pixel value")

    def interface(self, fields):
        fields[_t('Radius')] = self.RankSizeField(self.RANK_SIZES[0])
        fields[_t('Amount')] = self.SliderField(100, 1, 100)

    icon = \
'x\xda\x01\x97\x08h\xf7\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\
\x00\x000\x08\x06\x00\x00\x00W\x02\xf9\x87\x00\x00\x00\x04sBIT\x08\x08\x08\
\x08|\x08d\x88\x00\x00\x08NIDATh\x81\xed\x98ml[\xe5\x15\xc7\x7f\xe7\xde\xeb\
\xeb\xb7\xb8n\xda\xe0$n\x1aw!-\x1d 6\xc8B\x9a&\xb6\xb2\xacH\xdb\xd8\x04\x1a\
\x12l\xec\x85\xb1\x1766\x81\x06Lb\x1b\xe2\xc3\x06\xdb4m\xd3\xb4\xb1\x0f\xa8e\
c\x1a\xa8\xd2@\xe2\x0b\xf0\xa1\xa3\xd0@\xa2\x86\xa8M(UK\xb3\x92\x9a\xe08\xe9\
\x1b\x89k\xd2\xc4/\xd7\xbe\xcf>\xd8n\x03\xcb\x9b\x89\xdbj\x12\x7f\xe9\xca~|\
\xcf=\xe7\xfc}\x9e\xe7\xbc\\\xf8\x18\x97\x16\xfa\xc52\xd4\xdd\xdd}y]]]:\x1e\
\x8f\xe7*\xa9W\xab\xa4\xb2\xc5`\xdb\xb6\x18\x86\x11\xa9\xb4\xde\x8bI \xafiZ\
\xdb<\xb7V\x01\xd7\x01\xb7\x02\x8f\x025\xe5\xe85*\xe0\xdb\xb2\xa0\x94j\x02\
\xc6\x81\x87\x81\x8d\xc0Q@\x01g\x80\x11`\x10\xd8E\x81\xcc\x9e\xe5\xea\xbdh\
\x04Dd3\xf0\x06\xf0\x14p\x1b\xb0\x19x\x11\xd8[\x14\xd9\x0c\xb4\x02=\xe5\x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