def _image_name(self, idx, filename):
    if (idx is None):
        idx = self._storage['current_file']
    (fn, extension) = path.splitext(filename)
    _path = '{:0>3}_{}'.format(idx, fn)
    if self._params['rename_pages']:
        _path = '{:0>3}'.format(idx)
    return (_path + extension)
def _image_name(self, idx, filename):
    if (idx is None):
        idx = self._storage['current_file']
    (fn, extension) = path.splitext(filename)
    _path = '{:0>3}_{}'.format(idx, fn)
    if self._params['rename_pages']:
        _path = '{:0>3}'.format(idx)
    return (_path + extension)