set the source image path
13939
public function source($path, $override_chroot = false) {
		// if chroot is enabled, restrict the path to the chroot
		$this->Source = Filesystem::chroot($path, $override_chroot);
		// return self
		return($this);
	}
759833
def set_source(self, source):
        """"""
        route = Navigator(source=self.source).navigate_to_source(source)

        # Save new source
        self.source = source

        return self._send_keystroke(route, wait=True)
513582
def image_path_from_index(self, index):
        
        assert self.image_set_index is not None, "Dataset not initialized"
        name = self.image_set_index[index]
        image_file = os.path.join(self.data_path, 'JPEGImages', name + self.extension)
        assert os.path.exists(image_file), 'Path does not exist: {}'.format(image_file)
        return image_file
559608
public static void setImage(String path, Map<String, String> attributes) {

        CmsJSONMap attributesJS = CmsJSONMap.createJSONMap();
        for (Entry<String, String> entry : attributes.entrySet()) {
            attributesJS.put(entry.getKey(), entry.getValue());
        }
        nativeSetImage(path, attributesJS);
    }
700863
function (path) {
        var self = this;

        path = /^(.*?)\/?(\w+)?$/.exec(path);

        // Update path parts
        self.path = path[0];
        self.directory = path[1];
        self.file = path[2];

        // Rebuild source
        self.source = '';
        self.getURI();
      }
385614
def addImagePath(new_path):
    
    if os.path.exists(new_path):
        Settings.ImagePaths.append(new_path)
    elif "http://" in new_path or "https://" in new_path:
        request = requests.get(new_path)
        if request.status_code < 400:
            # Path exists
            Settings.ImagePaths.append(new_path)
        else:
            raise OSError("Unable to connect to " + new_path)
    else:
        raise OSError("File not found: " + new_path)
72940
def set_path(self, path):
		""""""
		if os.path.isabs(path):
			path = os.path.normpath(os.path.join(self.cwd, path))

		self.path = path
		self.relative = os.path.relpath(self.path, self.base)
1040098
def _set_image(self, image):
        
        if image:
            self._image_cache = image
            self._dimensions_cache = image.size
        else:
            if hasattr(self, '_image_cache'):
                del self._cached_image
            if hasattr(self, '_dimensions_cache'):
                del self._dimensions_cache
1184590
def pickFilepath( self ):
        
        filepath = QFileDialog.getOpenFileName( self,
                                                'Select Image File',
                                                QDir.currentPath(),
                                                self.fileTypes())
        
        if type(filepath) == tuple:
            filepath = nativestring(filepath[0])
        
        if ( filepath ):
            self.setFilepath(filepath)
375412
def set_destination(source, suffix, filename=False, ext=None):
    """"""
    source_dirname = os.path.dirname(source)

    # Do not create nested temp folders (/temp/temp)
    if not source_dirname.endswith('temp'):
        directory = os.path.join(source_dirname, 'temp')  # directory
    else:
        directory = source_dirname

    # Create temp dir if it does not exist
    if not os.path.isdir(directory):
        os.mkdir(directory)

    # Parse source filename
    if filename:
        src_file_name = filename
    else:
        src_file_name = Path(source).stem  # file name
    if ext:
        src_file_ext = ext
    else:
        src_file_ext = Path(source).suffix  # file extension

    # Concatenate new filename
    dst_path = src_file_name + '_' + suffix + src_file_ext
    full_path = os.path.join(directory, dst_path)  # new full path

    if not os.path.exists(full_path):
        return full_path
    else:
        # If file exists, increment number until filename is unique
        number = 1
        while True:
            dst_path = src_file_name + '_' + suffix + '_' + str(number) + src_file_ext
            if not os.path.exists(dst_path):
                break
            number = number + 1
        full_path = os.path.join(directory, dst_path)  # new full path
        return full_path
1269198
function imagesPath() {
    var cssFile = "jquery.cleditor.css",
        href = $("link[href$='" + cssFile +"']").attr("href");
    return href.substr(0, href.length - cssFile.length) + "images/";
  }
1062959
public void setSourcePath(String sourcePath) {
		this.sourcePath = new ArrayList<>();
		for (final String path : Strings.split(sourcePath, Pattern.quote(File.pathSeparator))) {
			this.sourcePath.add(normalizeFile(path));
		}
	}
447877
def load_image(self, file_path, redraw=True):
        

        if not os.path.exists(file_path):
            raise IOError('%s not found' % file_path)

        img = Image.open(file_path).convert('RGB')
        pixel_list = list(map(list, img.getdata()))

        if redraw:
            self.set_pixels(pixel_list)

        return pixel_list
689129
def load_image(self, imagepath, width=None, height=None):
        """"""

        if width:
            self.width = width
            self.canvas["width"] = width
        if height:
            self.height = height
            self.canvas["height"] = height

        self.image = imagepath
        size = (self.width, self.height)
        load_image(self.canvas, self.image, bounds=size)
        self.canvas.update_idletasks()
1137655
def set_image(self, img, bgr=False):
        ''''''
        if not self.is_alive():
            return
        if bgr:
            img = cv.CloneImage(img)
            cv.CvtColor(img, img, cv.CV_BGR2RGB)
        self.in_queue.put(MPImageData(img))
831102
def set_font_path(self, path, onerror = None):
        """"""
        request.SetFontPath(display = self.display,
                            onerror = onerror,
                            path = path)
813783
def set_root_path(self, path, hide_extra_columns=True):
        
        if not self.isVisible():
            self._path_to_set = path
            self._hide_extra_colums = hide_extra_columns
            return
        if sys.platform == 'win32' and os.path.splitunc(path)[0]:
            mdl = QtGui.QStandardItemModel(1, 1)
            item = QtGui.QStandardItem(
                QtGui.QIcon.fromTheme(
                    'dialog-warning',
                    QtGui.QIcon(':/pyqode-icons/rc/dialog-warning.png')),
                'UNC pathnames not supported.')
            mdl.setItem(0, 0, item)
            self.setModel(mdl)
            self.root_path = None
            return
        self._hide_extra_colums = hide_extra_columns

        if os.path.isfile(path):
            path = os.path.abspath(os.path.join(path, os.pardir))
        self._fs_model_source = QtWidgets.QFileSystemModel()
        self._fs_model_source.setFilter(QtCore.QDir.Dirs | QtCore.QDir.Files |
                                        QtCore.QDir.NoDotAndDotDot |
                                        QtCore.QDir.Hidden)
        self._fs_model_source.setIconProvider(self._icon_provider)
        self._fs_model_proxy = self.FilterProxyModel()
        for item in self._ignored_patterns:
            self._fs_model_proxy.ignored_patterns.append(item)
        self._fs_model_proxy.setSourceModel(self._fs_model_source)
        self._fs_model_proxy.set_root_path(path)
        # takes parent of the root path, filter will keep only `path`, that
        # way `path` appear as the top level node of the tree
        self._root_path = os.path.dirname(path)
        self.root_path = path
        self._fs_model_source.directoryLoaded.connect(self._on_path_loaded)
        self._fs_model_source.setRootPath(self._root_path)