Home > Download >  Library download

  • <?php namespace Intervention\Image; use GuzzleHttp\Psr7\Stream; use Psr\Http\Message\StreamInterface; abstract class AbstractDecoder {     abstract public function initFromPath($path); turn \Intervention\Image\Image     abstract public function initFromBinary($data);     abstract public function initFromGdResource($resource);     abstract public function initFromImagick(\Imagick $object);     private $data;     public function __construct($data = null)     {         $this->data = $data;     }return \Intervention\Image\Image     public function initFromUrl($url)     {                  $options = [             'http' => [                 'method'=>"GET",                 'header'=>"Accept-language: en\r\n".                 "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2\r\n"           ]         ];Image processing is a technology that uses computers to analyze images to achieve the desired results. Also called image processing. Image processing generally refers to digital image processing. A digital image refers to a large two-dimensional array captured by industrial cameras, video cameras, scanners and other equipment. The elements of the array are called pixels, and their values ​​are called grayscale values. Image processing technology generally includes three parts: image compression, enhancement and restoration, matching, description and recognition.

    Picture library61962017-12-18
  • <?php use PHPImageWorkshop\ImageWorkshop as ImageWorkshop; require_once(__DIR__.'/autoload.php'); class ImageWorkshopTest extends \PHPUnit_Framework_TestCase {      const IMAGE_SAMPLE_PATH = '/Resources/images/sample1.jpg';     const FONT_SAMPLE_PATH  = '/Resources/fonts/arial.ttf';     const WEB_PATH          = 'http://localhost:8000';       public function testInitFromPath()     {           $layer = ImageWorkshop::initFromPath(__DIR__.static::IMAGE_SAMPLE_PATH);                  $this->assertTrue(is_object($layer) === true, 'Expect $layer to be an object');         $this->assertTrue(get_class($layer) === 'PHPImageWorkshop\Core\ImageWorkshopLayer', 'Expect $layer to be an ImageWorkshopLayer object');         $layer = ImageWorkshop::initFromPath('file://'.__DIR__.static::IMAGE_SAMPLE_PATH);         $this->assertTrue(is_object($layer) === true, 'Expect $layer to be an object');         $this->assertTrue(get_class($layer) === 'PHPImageWorkshop\Core\ImageWorkshopLayer', 'Expect $layer to be an ImageWorkshopLayer object');Image processing is a technology that uses computers to analyze images to achieve the desired results. Also called image processing. Image processing generally refers to digital image processing. A digital image refers to a large two-dimensional array captured by industrial cameras, video cameras, scanners and other equipment. The elements of the array are called pixels, and their values ​​are called grayscale values. Image processing technology generally includes three parts: image compression, enhancement and restoration, matching, description and recognition.

    Picture library54462017-12-18
  • <?php require '../vendor/autoload.php'; $image = new \NMC\ImageWithText\Image(dirname(__FILE__) . '/source.jpg'); // Add another styled text to image $text2 = new \NMC\ImageWithText\Text('No, really, thanks!', 1, 30); $text2->align = 'left'; $text2->color = '000000'; $text2->font = dirname(__FILE__) . '/Ubuntu-Medium.ttf'; $text2->lineHeight = 20; $text2->size = 14; $text2->startX = 40; $text2->startY = 140; $image->addText($text2); $image->render(dirname(__FILE__) . '/destination.jpg');The text system used in embedded systems is called embedded text. It consists of three parts: software related to embedded text management, managed embedded text, and data structures required to implement embedded text management. Embedded text is the core of the embedded text system. It is the storage form of user data information, thereby realizing the functions of the embedded system.

    Picture library47982017-12-18
  • The <?php namespace League\Flysystem; interface AdapterInterface extends ReadInterface {     const VISIBILITY_PUBLIC = 'public';     const VISIBILITY_PRIVATE = 'private';     public function write($path, $contents, Config $config);     public function writeStream($path, $resource, Config $config);     public function update($path, $contents, Config $config);     public function updateStream($path, $resource, Config $config);     /**      * Rename a file.      *      * @param string $path      * @param string $newpath      *      * @return bool      */     public function rename($path, $newpath);system.ini section defines the modules required for the WINDOWS system, related keyboard, mouse, graphics card, multimedia drivers, standard fonts, and shell programs. The programs defined here are required when starting WINDOWS. is loaded, so it is indispensable and cannot be changed casually, otherwise some devices cannot be used or cannot enter WINDOWS at all. The above is the abstract PHP library of flysystem file stream

    Other libraries17112017-12-18
  • <?php namespace Versionable\Ferret; use Versionable\Ferret\FerretInterface; use Versionable\Ferret\Detector\DetectorInterface; class Ferret implements FerretInterface {   protected $detector = null;   public function getDetector()   {     return $this->detector;   }   public function setDetector(DetectorInterface $detector)   {     $this->detector = $detector     return true;   }FerretNOAA/PMEL/ An interactive computer visualization and data analysis system developed by TMAP (National Oceanic and Atmospheric Administration/ Pacific Marine Environment Laboratory/the Thermal Modeling and Analysis Project, Thermal Simulation and Analysis Project Group). Designed to meet the needs of oceanographers and meteorologists for processing and analyzing data and plotting, this is a FerretMIME detection PHP library.

    Other libraries12192017-12-18
  • <?php namespace League\ColorExtractor\Test; use League\ColorExtractor\Color; use League\ColorExtractor\ColorExtractor; use League\ColorExtractor\Palette; class PaletteTest extends \PHPUnit_Framework_TestCase {     protected $jpegPath = './tests/assets/test.jpeg';     protected $gifPath = './tests/assets/test.gif';     protected $pngPath = './tests/assets/test.png';     protected $transparentPngPath = './tests/assets/red-transparent-50.png';     public function testJpegExtractSingleColor()     {         $extractor = new ColorExtractor(Palette::fromFilename($this->jpegPath));         $colors = $extractor->extract(1);         $this->assertInternalType('array', $colors);         $this->assertCount(1, $colors);         $this->assertEquals(15985688, $colors[0]);     }     public function testGifExtractSingleColor()     {         $extractor = new ColorExtractor(Palette::fromFilename($this->gifPath));         $colors = $extractor->extract(1);         $this->assertInternalType('array', $colors);         $this->assertCount(1, $colors);         $this->assertEquals(12022491, $colors[0]);     }13 features of this library 1. Color capture allows you to pick and detect and identify colors instantly with the camera.  2. The application is designed for graphic designers and color blinds.  3. Color name, hue, RGB and HSV representation.  (No click to capture is required) Real-time color diagnosis.  4. Set the color of the shot to a solid wallpaper.  5. Intelligent color stability.  6. Intelligent autofocus.  7. Camera flashlight, turn on/off.  8. Supports all mobile phone cameras (front and rear).  9. Instant color selection and saving.  10. Color, color name, RGB hexadecimal, RGB decimal and HSV representation.  11. Up to 1300 colors and 16 basic color categories.  12. Instantly share and export captured colors.  13. Embedded help.

    Other libraries31952017-12-18
  • <?php error_reporting(-1); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); date_default_timezone_set('Europe/Brussels'); if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) {     echo 'Could not find "vendor/autoload.php". Did you forget to run "composer install --dev"?' . PHP_EOL;     exit(1); } $autoloader = require $autoloadFile; define('PHPEXIF_TEST_ROOT', __DIR__);Exif is an image file format, and its data storage is exactly the same as the JPEG format. In fact, the Exif format inserts digital photo information into the header of the JPEG format, including various shooting conditions such as aperture, shutter, white balance, ISO, focal length, date and time, as well as camera brand, model, color coding, shooting Recorded sounds as well as GPS global positioning system data, thumbnails, etc. You can view photos in Exif format using any image viewing software that can view JPEG files, but not all graphics programs can handle Exif information. This is a PHP library for reading Exif information.

    Other libraries13892017-12-18
  • require_once __DIR__.'/../vendor/autoload.php'; if (!class_exists('Twig_Environment')) {     echo 'You must set up the project dev dependencies, run the following commands:'.PHP_EOL.         'php composer.phar install --dev'.PHP_EOL;     exit(1); } $repository = new Dflydev\ApacheMimeTypes\FlatRepository; $typeToExtensions = $repository->dumpTypeToExtensions(); $extensionToType = $repository->dumpExtensionToType(); file_put_contents(__DIR__.'/../src/Dflydev/ApacheMimeTypes/Resources/mime.types.json', json_encode($typeToExtensions)); $twig = new Twig_Environment(     new Twig_Loader_Filesystem(__DIR__.'/../resources'),     array(         'autoescape'  => false,         'auto_reload' => true,     ) );Apache is the world's number one web server software. It can run on almost all widely used computer platforms and is one of the most popular web server-side software due to its cross-platform and security features. It is fast, reliable and can be extended through a simple API to compile interpreters such as Perl/Python into the server. This is dflydev parsing Apache's PHP library.

    Database operation class51672017-12-18
  • <?php require __DIR__.'/src/functions_include.php'; spl_autoload_register(function ($class) {     $prefix = 'League\Csv\';     if (0 !== strpos($class, $prefix)) {         return;     }     $file = __DIR__.'/src/'.str_replace('\', '/', substr($class, strlen($prefix))).'.php';     if (!is_readable($file)) {         return;     }     require $file; });Comma-Separated Values ​​(CSV, sometimes also called character-separated values, because the separator character may not be a comma), its file stores tabular data (numbers and text) in plain text. Plain text means that the file is a sequence of characters and contains no data that must be interpreted like a binary number. A CSV file consists of any number of records, separated by some kind of newline character; each record consists of fields, and the separators between fields are other characters or strings, most commonly commas or tabs. Typically, all records have exactly the same sequence of fields. Usually these are plain text files. It is recommended to use WORDPAD or Notepad (NOTE) to open it, and then save a new file first and then open it with EXCEL, which is also one of the methods. A universal standard for the CSV file format does not exist, but there is a basic description in RFC 4180. The character encoding used is also not specified, but 7-bit ASCII is the most basic universal encoding.

    Database operation class52242017-12-18
  • <?php namespace Dflydev\Canal\Analyzer; use Dflydev\Canal\Detector\DefaultDetectorFactory; use Dflydev\Canal\Detector\DetectorInterface; use Dflydev\Canal\InternetMediaType\DefaultInternetMediaTypeParserFactory; use Dflydev\Canal\InternetMediaType\InternetMediaTypeParserInterface; use Dflydev\Canal\Metadata\Metadata; class Analyzer {     private $detector;     private $internetMediaTypeParser;     public function __construct(DetectorInterface $detector = null)     {         if (null === $detector) {             $detector = DefaultDetectorFactory::create();         }         $this->detector = $detector;         $this->internetMediaTypeParser = DefaultInternetMediaTypeParserFactory::create();     }     public function setDetector(DetectorInterface $detector)     {         $this->detector = $detector;         return $this;     } "Internet media", also known as "online media", is a method that uses the international Internet as an information dissemination platform to disseminate news information in the form of text, sound, images, etc. using computers, televisions, and mobile phones as terminals. A digital, multimedia communication medium. Compared with newspapers, radio, television and other media that have already been born, Internet media is also the "fourth media". Strictly speaking, Internet media refers to that part of the communication tool performance of the international Internet that is used by people to disseminate news information. The pluralistic characteristics of Internet media are first reflected in the main body of communication. In the Internet media world, it is not unique to specialized news communication organizations. In terms of network attributes, government, corporate and institutional websites and even personal websites have the ability to publish news, becoming The main body of news dissemination. Secondly, the globalization characteristics of Internet media determine its cultural diversity. It uses digital technology through hyperlinks and hypertext to connect global cultures together through the Internet. Third, the communication methods of Internet media also have the characteristics of diversity. The mode of communication of media is generally point-to-point communication. In addition to point-to-many, that is, a website releases information to netizens, or a certain netizen releases information to other unspecified netizens, Internet media also has point-to-point, that is, netizens communicate to other netizens through the Internet. The method of a certain netizen sending an email, the multi-point method of many netizens sending information and feedback to a certain website, and the many-to-many communication methods such as online chat rooms and electronic bulletin boards. Based on the definition of the concept of Internet media, in view of the fact that there are certain differences between different terms such as "Internet", "Internet" and "Internet media", we advocate using them in different contexts. In the field of information science and in daily life, the "Internet" can be used; in the field of news and information dissemination, it is appropriate to use "Internet media", which can also be called "network media".

    Other libraries19892017-12-16
  • $mailServer="imap.exmail.qq.com"; //IMAP主机 $mailLink="{{$mailServer}:143}INBOX" ; //imagp连接地址:不同主机地址不同 $mailUser = '***'; //邮箱用户名 $mailPass = '***'; //邮箱密码 $mbox = imap_open($mailLink,$mailUser,$mailPass); //开启信箱imap_open $totalrows = imap_num_msg($mbox); //取得信件数 for ($i=1;$i<$totalrows;$i++){   $headers = imap_fetchheader($mbox, $i); //获取信件标头   $headArr = matchMailHead($headers); //匹配信件标头   $mailBody = imap_fetchbody($mbox, $i, 1); //获取信件正文 } function matchMailHead($str){   $headList = array();   $headArr = array(     'from',     'to',     'date',     'subject'   );   foreach ($headArr as $key){     if(preg_match('/'.$key.':(.*?)[\n\r]/is', $str,$m)){       $match = trim($m[1]);       $headList[$key] = $key=='date'?date('Y-m-d H:i:s',strtotime($match)):$match;     }   }   return $headList; }Fetch-masterIMAP's PHP library is a method for PHP to receive emails based on IMAP. It also analyzes the relevant settings and usage skills of PHP for receiving emails based on IMAP, and comes with instructions for IMAP-related functions.

    Other libraries10672017-12-16
  • <?php use Gaufrette\Filesystem; use Gaufrette\Adapter\Ftp as FtpAdapter; use Gaufrette\Adapter\Local as LocalAdapter; use Gaufrette\Adapter\Cache as CacheAdapter; // Locale Cache-Directory (e.g. '%kernel.root_dir%/cache/%kernel.environment%/filesystem') with create = true $local = new LocalAdapter($cacheDirectory, true); // FTP Adapter with a defined root-path $ftp = new FtpAdapter($path, $host, $username, $password, $port); // Cached Adapter with 3600 seconds time to live $cachedFtp = new CacheAdapter($ftp, $local, 3600); $filesystem = new Filesystem($cachedFtp);Gaufrette provides a file system abstraction layer PHP5 library. It enables the same way to manipulate local files, FTP servers, Amazon S3, etc. It allows you to develop programs without knowing how you will access your files in the future.

    Other libraries9242017-12-16