Skip to content

Check if images are valid by Mininum Maximum size with image detail array

License

Notifications You must be signed in to change notification settings

galiteintechnologies/image-size-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Size Finder

Extension to get image details with size, height,width and valid flag value by mininum/maxinum size given in configuration.

Latest Version Software License Scrutinizer Code Quality Build Status

Installation

If you use composer, you can add this package by running

composer require galiteintechnologies/image-size-finder

Usage

Set minimum and maximum value in bytes in configuration file. like this

image_size:
    minimum: 100
    maximum: 900

If you do not create configuration file it will from package.

<?php

use ImageSizeFinder\PictureParser;

$pictureParser = new PictureParser();
        
$images = ['https://raw.githubusercontent.com/nexuslinkservices/image-size-finder/master/web/samples/sample_image.png'];
$imageDetails = $pictureParser->fetchSize($images);
        
var_dump($imageDetails[0]);        

Output

array = [
        "url"=> "https://raw.githubusercontent.com/nexuslinkservices/image-size-finder/master/web/samples/sample_image.png",
        "size"=> 82966,
        "height"=> 512,
        "width"=> 512,
        "valid"=> true 
    ];

CONTRIBUTING:

Pull requests are always welcome.

About

Check if images are valid by Mininum Maximum size with image detail array

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages