Filter still images

@return Images
488986
public function filterStills()
    {
        return $this->filter(
            function ($key, $value) {
                if ($value instanceof ImageFilter && $value instanceof Image\StillImage) {
                    return true;
                }
            }
        );
    }
937590
def filter(self, containers=True, images=True, stopped=True, cached=False, sort_by_created=True):
        
        content = []
        containers_o = None
        images_o = None
        # return containers when containers=False and running=True
        if containers or not stopped:
            containers_o = self.get_containers(cached=cached, stopped=stopped)
            content += containers_o.response
        if images:
            images_o = self.get_images(cached=cached)
            content += images_o.response
        if sort_by_created:
            content.sort(key=attrgetter("natural_sort_value"), reverse=True)
        return content, containers_o, images_o
537107
public function enaImageFiles()
    {
        $properties = $this->getProperties();
        $extString  = (!empty($properties['acceptedFiles'])) ? $properties['acceptedFiles'] : '';
        $imagExts   = $this->getImageExtensionConstant();
        foreach ($imagExts as $imagExt) {
            if (in_array($imagExt, $extString) === false) {
                $extString[] = $imagExt;
            }
        }
        $properties                     = $this->getProperties();
        $properties['acceptedFiles']    = $extString;
        $this->setProperties($properties);
        return $this;
    }
650955
public function getFilters()
    {
        return [
            new TwigFilter('download', [$this, 'getDownload']),
            new TwigFilter('download_link', [$this, 'getDownloadLink']),
            new TwigFilter('download_path', [$this, 'getDownloadPath']),
            new TwigFilter('download_data', [$this, 'getDownloadData']),
            new TwigFilter('download_title', [$this, 'getDownloadTitle']),
        ];
    }
688051
public function getImages()
    {
        $images = array();

        $nodes = $this->html->findTags('img');
        foreach ($nodes as $node) {
            $source = trim($node->getAttribute('src'));

            if (empty($source)) {
                continue;
            }

            $url = $this->getAbsoluteUrl($source);
            $size = $this->getImageSize($url);

            if (is_array($size)) {
                list($width, $height) = $size;
            } else {
                continue;
            }

            if ($this->isImageAccepted($url, $width, $height)) {
                $images[] = array(
                    'url'    => $url,
                    'width'  => $width,
                    'height' => $height,
                    'area'   => ($width * $height)
                );
            }
        }

        return $images;
    }
1273312
public function getPaginatedGalleryImages() {

        $getGalleryImages = $this->GalleryImages()->sort('SortOrder DESC');
        $getRequest = $this->getRequest();

        $paginatedGalleryImages = PaginatedList::create(
            $getGalleryImages,
            $getRequest
        )->setPageLength(12);

        return $paginatedGalleryImages;

    }
52825
public function getCurrentFilters()
    {
        $sessionValues = $this->session->get(Configuration::SESSION_PREFIX.'filters', null);

        return $sessionValues !== null ? $sessionValues : $this->getDefaultFilters();
    }
978723
public function gd_filter_vintage()
	{
		if ($this->imageResized)
		{
			$this->imageResized = $this->gd_apply_overlay($this->imageResized, 'vignette', 45);
			imagefilter($this->imageResized, IMG_FILTER_BRIGHTNESS, 20);
			imagefilter($this->imageResized, IMG_FILTER_CONTRAST, -35);
			imagefilter($this->imageResized, IMG_FILTER_COLORIZE, 60, -10, 35);
			imagefilter($this->imageResized, IMG_FILTER_SMOOTH, 7);
			$this->imageResized = $this->gd_apply_overlay($this->imageResized, 'scratch', 10);
		}
	}
776175
def images
      @images = doc.css('img').map { |img| img['src'].to_s }.uniq.delete_if { |src| src.empty? }.map { |url| absolutify(url.strip) }
    end
1096301
private Collection<DockerImage> filterDockerImagesToScan(Collection<DockerImage> dockerImages, String[] dockerImageIncludes, String[] dockerImageExcludes) {
        logger.info("Filtering docker images list by includes and excludes lists");
        Collection<DockerImage> dockerImagesToScan = new LinkedList<>();
        Collection<String> imageIncludesList = Arrays.asList(dockerImageIncludes);
        Collection<String> imageExcludesList = Arrays.asList(dockerImageExcludes);
        for (DockerImage dockerImage : dockerImages) {
            String dockerImageString = dockerImage.getRepository() + Constants.WHITESPACE + dockerImage.getTag() + Constants.WHITESPACE + dockerImage.getId();
            // add images to scan according to dockerIncludes pattern
            if (isMatchingPattern(dockerImageString, imageIncludesList)) {
                dockerImagesToScan.add(dockerImage);
            }
            // remove images from scan according to dockerExcludes pattern
            if (isMatchingPattern(dockerImageString, imageExcludesList)) {
                dockerImagesToScan.remove(dockerImage);
            }
        }
        return dockerImagesToScan;
    }
36972
public function filterBackdrops()
    {
        return $this->filter(
            function ($key, $value) {
                if ($value instanceof ImageFilter && $value instanceof Image\BackdropImage) {
                    return true;
                }
            }
        );
    }
580628
public function disImageFiles()
    {
        $properties     = $this->getProperties();
        $acceptedFiles  = $properties['acceptedFiles'];
        $imagExt        = $this->getImageExtensionConstant();
        $acceptedFiles  = $this->rmAcceptedFiles($acceptedFiles, $imagExt);
        $properties['acceptedFiles']    = $acceptedFiles;
        $this->setProperties($properties);
        return $this;
    }
26733
def _original_images(self, **kwargs):
        

        def test(image):
            if not image.original:
                return False
            for filter, value in kwargs.items():
                if getattr(image, filter) != value:
                    return False
            return True

        if Session.object_session(self.instance) is None:
            images = []
            for image, store in self._stored_images:
                if test(image):
                    images.append(image)

            state = instance_state(self.instance)
            try:
                added = state.committed_state[self.attr.key].added_items
            except KeyError:
                pass
            else:
                for image in added:
                    if test(image):
                        images.append(image)
            if self.session:
                for image in self.session.new:
                    if test(image):
                        images.append(image)
        else:
            query = self.filter_by(original=True, **kwargs)
            images = query.all()
        return images
1018909
public function getMageNowForDb()
    {
        $dt = $this->getMageNow();
        $result = $this->hlpFormat->dateTimeForDb($dt);
        return $result;
    }
266759
public function get_images() {
        $results = $this->api_call('images.php', array(
            'collection' => $this->get_type()
        ));

        return array_map(function($o) {
            return $this->get_image($o);
        }, $results);
    }
193336
public function getAllImageFormats()
    {
        if ($this->allImageFormats === null) {
            $this->allImageFormats = [
                static::FORMAT_PNG,
                static::FORMAT_JPEG,
                static::FORMAT_GIF,
                static::FORMAT_WBMP,
                static::FORMAT_XBM,
            ];
        }

        return $this->allImageFormats;
    }
225316
public function filter()
    {
        $this->updateFilters()
             ->checkActivePage();

        $previousUrl = app('url')->previous();
        $previousUrl = $this->removePageQueryFromUrl($previousUrl);

        return redirect()->to($previousUrl);
    }