Filter poster images

@return Images
973222
public function filterPosters()
    {
        return $this->filter(
            function ($key, $value) {
                if ($value instanceof ImageFilter && $value instanceof Image\PosterImage) {
                    return true;
                }
            }
        );
    }
440253
def images(self):
        
        if len(self._plain_images) <= 0:
            self._convert_images()

        return iter(self._plain_images)
1084098
private function getImageFiles()
    {
        if ($this->imageFiles === null) {
            // Get a list of images.
            $this->imageFiles = $this->filesystem
                ->find()
                ->in('files://')
                ->name('/\.jpe?g$/')
                ->name('*.png')
                ->toArray()
            ;
        }

        return $this->imageFiles;
    }
676356
def avail_images():
    '''
    
    '''
    response = _query('grid', 'image/list')

    ret = {}
    for item in response['list']:
        name = item['friendlyName']
        ret[name] = item

    return ret
1066000
public function removeImageSources()
    {
        $log = [];
        foreach (StorageImage::find()->where(['filter_id' => $this->id])->all() as $img) {
            $source = $img->serverSource;
            $image = $img->delete();
            
            $log[$source] = $image;
        }
        
        return $log;
    }
127095
public function getImagesForSeo() {
		$result = new ArrayList();
		$pwis = $this->owner->AllChildren()->where("ClassName in (
			'PageWithImage','PageWithImagesFolder')");
		foreach ($pwis->getIterator() as $pwi) {
			if ($pwi->MainImageID > 0) {
				$result->push($pwi->MainImage());
			}
		}
		return $result;
	}
957585
public function getFilters()
    {
        return [
            new Twig_SimpleFilter('print_convert_money', [
                $this->moneyPrinter,
                'printConvertMoney',
            ]),
            new Twig_SimpleFilter('print_money', [
                $this->moneyPrinter,
                'printMoney',
            ]),
            new Twig_SimpleFilter('print_money_from_value', [
                $this->moneyPrinter,
                'printMoneyFromValue',
            ]),
        ];
    }
867308
private static List<ImageConfiguration> filterImages(String nameFilter, List<ImageConfiguration> imagesToFilter) {
        List<ImageConfiguration> ret = new ArrayList<>();
        for (ImageConfiguration imageConfig : imagesToFilter) {
            if (matchesConfiguredImages(nameFilter, imageConfig)) {
                ret.add(imageConfig);
            }
        }
        return ret;
    }
1289048
public function getSmallestImageSet()
    {
        $imageSet = $this->getImageSet();

        $returnSize = PHP_INT_MAX;
        $returnSet = null;

        foreach ($imageSet as $set) {
            $size = $set->width * $set->height;
            if ($size < $returnSize) {
                $returnSize = $size;
                $returnSet = $set;
            }
        }

        if ($returnSet === null) {
            $returnSet = new \stdClass();
            $returnSet->slug = 'original';
        }

        return $returnSet;
    }
595946
public function getImages()
    {
        $result = [];
        if ($this->getImage()) {
            $result[] = $this->getImage();
        }

        if (null == $this->getDOMDocument()) {
            return $result;
        }

        foreach ($this->getDOMDocument()->getElementsByTagName('img') as $img) {
            if ($src = $img->getAttribute('src')) {
                $result[] = $src;
            }
        }

        if ($this->configuration->getFixRelativeURLs()) {
            foreach ($result as &$imgSrc) {
                $imgSrc = $this->toAbsoluteURI($imgSrc);
            }
        }

        $result = array_unique(array_filter($result));

        return $result;
    }
530020
public function getAvailableReturnFormats()
    {
        try {
            $ret    = array();
            $result = $this->getSoapClient()->GetImageExportFormats();
            if ( isset($result->GetImageExportFormatsResult->string) ) {
                $ret = $result->GetImageExportFormatsResult->string;
                $ret = array_map('strtolower' , $ret);
            }

            return $ret;
        } catch ( SoapException $ex ) {
            throw new StatusException('Error while obtaining the list of all available image formats' , $ex);
        }
    }
766165
function filterFiles( files ){
    var filtered = [],
        file,
        i;
    for( i = 0; i < files.length; i++ ){
        file = files[ i ];
        if( file.height &&
            file.width &&
            file.url ){
            //This is sufficient to serve as a level
            filtered.push({
                url: file.url,
                width: Number( file.width ),
                height: Number( file.height )
            });
        }
        else {
            $.console.error( 'Unsupported image format: %s', file.url ? file.url : '<no URL>' );
        }
    }

    return filtered.sort(function(a, b) {
        return a.height - b.height;
    });

}
426069
public function getAcceptedFormats()
    {
        try {
            $ret    = array();
            $result = $this->getSoapClient()->GetImageImportFormats();
            if ( isset($result->GetImageImportFormatsResult->string) ) {
                $ret = $result->GetImageImportFormatsResult->string;
                $ret = array_map('strtolower' , $ret);
            }

            return $ret;
        } catch ( SoapException $ex ) {
            throw new StatusException('Error while obtaining the list of accepted image formats' , $ex);
        }
    }
531219
private function filterBadNames(NodeList $images): array {
        $goodImages = [];

        foreach ($images as $image) {
            if ($this->isOkImageFileName($image)) {
                $goodImages[] = $image;
            } else {
                $image->remove();
            }
        }

        return $goodImages;
    }
1088622
public function getFilters()
    {
        $filters = [
            new Twig_SimpleFilter('app', [$this, 'appFilter'], ['is_safe' => ['html']]),
            new Twig_SimpleFilter('media', [$this, 'mediaFilter'], ['is_safe' => ['html']]),
        ];

        /*
         * Include extensions provided by plugins
         */
        $filters = $this->markupManager->makeTwigFilters($filters);

        return $filters;
    }
1210608
public function getFilters(): Collection
    {
        $filters = collect();
        foreach ($this->filters() as $filter) {
            $filter = new $filter($this);
            $filters->push($filter);
        }

        return $filters;
    }
102684
public static mps_image[] get_filtered(nitro_service service, String filter) throws Exception
	{
		mps_image obj = new mps_image();
		options option = new options();
		option.set_filter(filter);
		mps_image[] response = (mps_image[]) obj.getfiltered(service, option);
		return response;
	}