.github/workflows/build.yml000064400000001205150731646700011772 0ustar00name: build on: [push] jobs: run: runs-on: ubuntu-latest strategy: matrix: php-versions: ['7.3', '7.4', '8.0'] name: Testing on PHP ${{ matrix.php-versions }} steps: - uses: actions/checkout@v2 - name: setup uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: mbstring,bcmath tools: phpunit,composer - name: install deps run: composer install -o -q - name: run phpunit run: vendor/bin/phpunit - name: run phpstan run: vendor/bin/phpstan analyze --no-progress --level=5 src/.gitignore000064400000000102150731646700006536 0ustar00.DS_Store composer.lock vendor/ dev/ .idea/ .phpunit.result.cache LICENSE000064400000002066150731646700005566 0ustar00The MIT License (MIT) Copyright (c) 2019 Oliver Vogel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.README.md000075500000006632150731646700006046 0ustar00# A class to detect mime types of given contents ![build](https://github.com/Intervention/mimesniffer/workflows/build/badge.svg) Detecting MIME Content-type in PHP is easy with [mime_content_type](https://www.php.net/manual/en/function.mime-content-type.php) or [Fileinfo](https://www.php.net/manual/en/book.fileinfo.php). But Fileinfo as an extension is sometimes not available on the server. The function `mime_content_type` wants a path to the filesystem as argument and doesn't process if we only have a string value. This package makes it easy to detect the mime types of the content of a given file or string, without any extension dependencies. Here's an example: ```php use Intervention\MimeSniffer\MimeSniffer; use Intervention\MimeSniffer\Types\ImageJpeg; // detect given string $sniffer = MimeSniffer::createFromString($content); // or detect given file $sniffer = MimeSniffer::createFromFilename('image.jpg'); // returns object of detected type $type = $sniffer->getType(); $bool = $type->isBinary(); // check if we have binary data $bool = $type->isImage(); // check if we are dealing with an image $bool = $type->isVideo(); // check video data was detected $bool = $type->isAudio(); // check if we have detected audio data $bool = $type->isArchive(); // check if an archive was detected $type = (string) $type; // cast type to string (e.g. "image/jpeg") // you can also check, if the content matches a specific type $bool = $sniffer->matches(new ImageJpeg); // or check, if the content matches an array of types $bool = $sniffer->matches([ImageJpeg::class, ImageGif::class]); // or check, if the content matches an array of type objects $bool = $sniffer->matches([new ImageJpeg, $type]); ``` If your prefer non-static initialization: ```php use Intervention\MimeSniffer\MimeSniffer; // create instance with constructor $sniffer = new MimeSniffer($content); // with setter for given content $type = $sniffer->setFromString($other_content)->getType(); // or with setter for filename $type = $sniffer->setFromFilename('images/image.jpg')->getType(); ``` **Currently only the following file types can be detected. More will be added in a next release.** ### Images - Image encoded as JPEG raw or in the JFIF or Exif file format - Image file encoded in the Graphics Interchange Format (GIF) - Image encoded in the Portable Network Graphics format (PNG) - Image encoded as BMP file, a bitmap format - Image encoded in High Efficiency Image File Format (HEIC/HEIF) - Icon encoded in ICO file format - Image in Google WebP image format - Scalable Vector Graphics (SVG) - Tagged Image File Format (TIFF) - Image encoded Photoshop Document file format (PSD) ### Archives - GZIP compressed - ZIP file - RAR archive - TAR file ### Videos - AVI - MPEG-1 and MPEG-2 video - MKV media container ### Audio - MP3 file - FLAC file ### Other - PDF document - OGG media container - SQLite Database - application/octet-stream (default binary) - text/plain (default) ## Installation Install the package easily via composer: ```bash composer require intervention/mimesniffer ``` ## Contributing Contributions are welcome. Please note the following guidelines before submiting your pull request. - Follow [PSR-2](http://www.php-fig.org/psr/psr-2/) coding standards. - Write tests for new functions and added features ## License Licensed under the [MIT License](http://opensource.org/licenses/MIT). Copyright 2019 [Oliver Vogel](https://olivervogel.com/) composer.json000064400000001430150731646700007275 0ustar00{ "name": "intervention/mimesniffer", "description": "PHP MIME Type Sniffer", "homepage": "http://intervention.io/", "keywords": ["mime", "type", "sniffer", "detector"], "license": "MIT", "authors": [ { "name": "Oliver Vogel", "email": "oliver@olivervogel.com", "homepage": "https://olivervogel.com/" } ], "require": { "php": "^7.3|^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0", "phpstan/phpstan": "^0.12.11" }, "autoload": { "psr-4": { "Intervention\\MimeSniffer\\": "src" } }, "autoload-dev": { "psr-4": { "Intervention\\MimeSniffer\\Test\\": "tests" } }, "minimum-stability": "stable" } phpunit.xml000064400000001035150731646700006765 0ustar00 ./tests/ src/AbstractBinaryType.php000064400000001024150731646700011624 0ustar00pattern, $this->prepareContent($content)) === 1; } /** * Determine if the detected type is an image * * @return boolean */ public function isImage(): bool { return substr($this->name, 0, 5) === 'image'; } /** * Determine if the detected type is an video * * @return boolean */ public function isVideo(): bool { return substr($this->name, 0, 5) === 'video'; } /** * Determine if the detected type is an audio file * * @return boolean */ public function isAudio(): bool { return substr($this->name, 0, 5) === 'audio'; } /** * Determine if the detected type is an archive * * @return boolean */ public function isArchive(): bool { return in_array($this->name, [ 'application/zip', 'application/x-rar-compressed', 'application/x-tar', 'application/gzip', ]); } /** * Prepare content (can be extended by child classes) * * @param string $content * @return string */ public function prepareContent(string $content): string { return substr($content, 0, 1024); } /** * Determine of current type is binary * * @return boolean */ public function isBinary(): bool { return false; } /** * Cast type to string * * @return string */ public function __toString(): string { return $this->name; } } src/Exceptions/NotMatchingException.php000064400000000240150731646700014264 0ustar00setFromString($content); } /** * Create new instance from given string * * @param string $content * * @return MimeSniffer */ public static function createFromString(string $content): MimeSniffer { return new self($content); } /** * Load contents of given string into instance * * @param string $content * * @return MimeSniffer */ public function setFromString(string $content): MimeSniffer { $this->content = strval($content); return $this; } /** * Create a new instance and load contents of given filename * * @param string $filename * * @return MimeSniffer */ public static function createFromFilename(string $filename): MimeSniffer { return (new self())->setFromFilename($filename); } /** * Load contents of given filename in current instance * * @param string $filename * * @return MimeSniffer */ public function setFromFilename(string $filename): MimeSniffer { $fp = fopen($filename, 'r'); $this->setFromString(fread($fp, 1024)); fclose($fp); return $this; } /** * Return detected type * * @return AbstractType */ public function getType(): AbstractType { foreach ($this->getTypeClassnames() as $classname) { $type = new $classname(); if ($type->matches($this->content)) { return $type; } } $binaryType = new Types\ApplicationOctetStream(); if ($this->matches($binaryType)) { return $binaryType; } return new Types\TextPlain(); } /** * Determine if content matches the given type * or any if the given types in array * * @param AbstractType|array $types AbstractType or array of AbstractTypes * @return boolean */ public function matches($types): bool { if (! is_array($types)) { $types = [$types]; } $types = array_map(function ($value) { if (is_a($value, AbstractType::class)) { return $value; } if (class_exists($value)) { return new $value(); } }, $types); $types = array_filter($types, function ($type) { return is_a($type, AbstractType::class); }); foreach ($types as $type) { if ($type->matches($this->content)) { return true; } } return false; } /** * Return array of type classnames * * @return array */ private function getTypeClassnames(): array { $files = array_diff(scandir(__DIR__ . '/Types'), ['.', '..']); $classnames = array_map(function ($filename) { return "Intervention\\MimeSniffer\\Types\\" . substr($filename, 0, -4); }, $files); return array_filter($classnames, function ($classname) { return ! in_array($classname, [ Types\ApplicationOctetStream::class, Types\TextPlain::class, ]); }); } } src/Types/ApplicationGzip.php000064400000000556150731646700012264 0ustar00]*\?>.*)?]*>/is"; } src/Types/ImageTiff.php000064400000000561150731646700011016 0ustar00getMockForAbstractClass(AbstractBinaryType::class); $this->assertEquals(1024, strlen($type->prepareContent($content))); $this->assertEquals('78787878', substr($type->prepareContent($content), 0, 8)); } public function testIsBinary() { $type = $this->getMockForAbstractClass(AbstractBinaryType::class); $this->assertTrue($type->isBinary()); } } tests/AbstractTypeTest.php000064400000002141150731646700011673 0ustar00getMockForAbstractClass(AbstractType::class); $this->assertEquals('', $type); } public function testMatches() { $type = $this->getMockForAbstractClass(AbstractType::class); $this->assertFalse($type->matches('test')); } public function testIsImage() { $type = $this->getMockForAbstractClass(AbstractType::class); $this->assertFalse($type->isImage()); } public function testPrepareContent() { $content = ''; for ($i = 0; $i < 2048; $i++) { $content .= 'x'; } $type = $this->getMockForAbstractClass(AbstractType::class); $this->assertEquals(1024, strlen($type->prepareContent($content))); } public function testIsBinary() { $type = $this->getMockForAbstractClass(AbstractType::class); $this->assertFalse($type->isBinary()); } } tests/ApplicationGzipTest.php000064400000001232150731646700012363 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/gzip'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ApplicationGzip::class, $this->type); } public function testIsImage() { $this->assertFalse($this->type->isImage()); } } tests/ApplicationOggTest.php000064400000001226150731646700012171 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/ogg'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ApplicationOgg::class, $this->type); } public function testIsImage() { $this->assertFalse($this->type->isImage()); } } tests/ApplicationPdfTest.php000064400000001226150731646700012166 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/pdf'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ApplicationPdf::class, $this->type); } public function testIsImage() { $this->assertFalse($this->type->isImage()); } } tests/ApplicationRarTest.php000064400000001231150731646700012175 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/rar'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ApplicationRar::class, $this->type); } public function testIsArchive() { $this->assertTrue($this->type->isArchive()); } } tests/ApplicationSqliteTest.php000064400000001104150731646700012711 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.sqlite'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ApplicationSqlite::class, $this->type); } } tests/ApplicationTarTest.php000064400000001236150731646700012204 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.tar'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ApplicationTar::class, $this->type); } public function testIsArchive() { $this->assertTrue($this->type->isArchive()); } } tests/ApplicationZipTest.php000064400000001231150731646700012213 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/zip'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ApplicationZip::class, $this->type); } public function testIsArchive() { $this->assertTrue($this->type->isArchive()); } } tests/AudioFlacTest.php000064400000001210150731646700011111 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/flac'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(AudioFlac::class, $this->type); } public function testIsImage() { $this->assertFalse($this->type->isImage()); } } tests/AudioMpegId3v2Test.php000064400000001221150731646700011746 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/mp3_id3v2'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(AudioMpeg::class, $this->type); } public function testIsAudio() { $this->assertTrue($this->type->isAudio()); } } tests/AudioMpegTest.php000064400000001214150731646700011140 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/mp3_id3v1'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(AudioMpeg::class, $this->type); } public function testIsAudio() { $this->assertTrue($this->type->isAudio()); } } tests/ImageBmpTest.php000064400000001210150731646700010743 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.bmp'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageBmp::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImageGifTest.php000064400000001210150731646700010732 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.gif'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageGif::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImageHeicTest.php000064400000001207150731646700011103 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/heic'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageHeic::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImageHeifTest.php000064400000001207150731646700011106 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/heif'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageHeif::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImageIcoTest.php000064400000001210150731646700010737 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.ico'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageIco::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImageJpegTest.php000064400000001213150731646700011115 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.jpg'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageJpeg::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImagePngTest.php000064400000001210150731646700010751 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.png'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImagePng::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImagePsdTest.php000064400000001203150731646700010755 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/psd'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImagePsd::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImageSvgTest.php000064400000002242150731646700010772 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.svg'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageSvg::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } public function testPlainXmlIsNotSvg() { $sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.xml'); $this->assertInstanceOf(TextPlain::class, $sniffer->getType()); } public function testSvgWithoutXmlTag() { $sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/svg'); $this->assertInstanceOf(ImageSvg::class, $sniffer->getType()); } } tests/ImageTiffTest.php000064400000001207150731646700011123 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/tiff'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageTiff::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/ImageWebpTest.php000064400000001214150731646700011126 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.webp'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(ImageWebp::class, $this->type); } public function testIsImage() { $this->assertTrue($this->type->isImage()); } } tests/MimeSnifferTest.php000064400000005303150731646700011475 0ustar00assertInstanceOf(MimeSniffer::class, $sniffer); $sniffer = new MimeSniffer(); $this->assertInstanceOf(MimeSniffer::class, $sniffer); } public function testCreateFromString() { $sniffer = MimeSniffer::createFromString('foo'); $this->assertInstanceOf(MimeSniffer::class, $sniffer); } public function testCreateFromFilename() { $sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.jpg'); $this->assertInstanceOf(MimeSniffer::class, $sniffer); } public function testSetFromString() { $sniffer = new MimeSniffer(); $sniffer = $sniffer->setFromString('foo'); $this->assertInstanceOf(MimeSniffer::class, $sniffer); } public function testSetFromFilename() { $sniffer = new MimeSniffer(); $sniffer = $sniffer->setFromFilename(__DIR__ . '/../tests/stubs/zip'); $this->assertInstanceOf(MimeSniffer::class, $sniffer); } public function testMatchesType() { $sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.gif'); $this->assertTrue($sniffer->matches(new ImageGif())); $this->assertFalse($sniffer->matches(new ImageJpeg())); } public function testMatchesArray() { $sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/files/test.gif'); $this->assertTrue($sniffer->matches([new ImageJpeg(), new ImagePng(), new ImageGif()])); $this->assertFalse($sniffer->matches([new ImageJpeg(), new ImagePng()])); $this->assertTrue($sniffer->matches([ImageJpeg::class, ImagePng::class, ImageGif::class])); $this->assertFalse($sniffer->matches([ImageJpeg::class, ImagePng::class])); } public function testMatchesBogus() { $sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/zip'); $this->assertFalse($sniffer->matches('foo')); $this->assertFalse($sniffer->matches(['foo', 'bar'])); $this->assertFalse($sniffer->matches([])); $this->assertFalse($sniffer->matches(null)); $this->assertTrue($sniffer->matches(['foo', ApplicationZip::class])); } } tests/VideoMpegTest.php000064400000001360150731646700011147 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/mpeg-video'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(VideoMpeg::class, $this->type); } public function testIsImage() { $this->assertFalse($this->type->isImage()); } public function testIsVideo() { $this->assertTrue($this->type->isVideo()); } } tests/VideoXmatroskaTest.php000064400000001370150731646700012231 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/mkv'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(VideoXmatroska::class, $this->type); } public function testIsImage() { $this->assertFalse($this->type->isImage()); } public function testIsVideo() { $this->assertTrue($this->type->isVideo()); } } tests/VideoXmsvideoTest.php000064400000001365150731646700012062 0ustar00sniffer = MimeSniffer::createFromFilename(__DIR__ . '/../tests/stubs/avi'); $this->type = $this->sniffer->getType(); } public function testType() { $this->assertInstanceOf(VideoXmsvideo::class, $this->type); } public function testIsImage() { $this->assertFalse($this->type->isImage()); } public function testIsVideo() { $this->assertTrue($this->type->isVideo()); } } tests/files/test.bin000064400000000400150731646700010464 0ustar00  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿtests/files/test.bmp000064400000001070150731646700010476 0ustar00BM86(  pppppppppppppppppppppppppppppppppppp`<  <`ppppppp T$$ Tppppp`$$`pppp<<pppp  pppppppppppp  pppp<<pppp`$$`ppppp T$$ Tppppppp`<  <`pppppppppppppppppppppppppppppppppppptests/files/test.gif000064400000001120150731646700010461 0ustar00GIF89aô9Kcÿ¦BO_EQ]mcIæ› jaK¹†$6zõžïefx«j쬺ÌË,ª¬ºÏYwY·x»oܽxù|½m™Uêóx«*­½VUUUîË«¶Ê¼~íêø|o•Ù⮯^²ªÌ«Ý]ef^«Åx»*ñ—ìÞ¿ÆÕYvfxººÍ«,¬»»á–eYvW‹¿n÷zùz÷^2Ï ¼x¬ª²Û«ª­²ÊñugмfÕúŸ½|=gŠÊÛ¼xõUfÕ–VÕfmâ³m»¯5y»²ü¯…êÏw»Íã6ñ[Ux«ÖUÕ^jë.ʲÚʺ³ÍYµf×çÙðóg�jóu^¯•UVÕÙ•›ufxñµmm[^²¶Í¿ãzómm^>uã32²Ú³3*«2Ê«­º¬øYfÕfWª¯u~W��·ÆÏw›²ÚÛ<ÝxÌ«ªË›z½[wUeµµ[W�2«+n½fÙîüÛÝŸÕwÆÌ÷VÕÝÕÕîê¶¶¯m]UÙW›½Ý_™ñ¼{½x÷xÛ+͵VmÕÕ]ž6êëkÅ••µg�²î­«»óoVy¼ßk¼ÛuvÝyªÌªÛl̪º¯<ÖVg›¼mß Çä|-¶øß+¶Ú»½]—UU•e••Y•m•⪼ÕÞì»k×àÙãáe·}=VÙµ›v]Y••·V[YUWvYvY·eÙUµâ³×»ðow»3ÍãÕÞ<ׯëÕe]]–m]UÕæ¬Ú«6®ùzÛÍãÍøŸO�ž®Û<Þ³j²«jêË«ºº«²Ë,Ì»«¶³ÍeÝòñü÷»ÕëÕ·mã<Ùvg›«j¶ÊÛÝfVVYãÅâ¯ãn²½ß™ñ³ÝæúÞ.ë*ìÛáuWvxª³n¬¬¬óYž*óvWšúÛ['Öúzù׊ڬËm¼]Õe|2ÊË,¬¬ñ—«³Ím^=Þo7Âõg¯xÏYx­»<׬ªÊ̲ÚÌʬ³ÆÖegŒ«2«.ͼzþ¯�îù^=zÛÅ™Ummž*³nõwU•y²õWx¯u^.«óï_/YëÝ{­¯Ymm]UYe·m^.®õ[e[VÕV]æó~Æûmæñxʬª¶Û,»¬»<ÝVU]·V]^l¯w^6³×äÞ¾_^îÛÍ•f|*Ì̽]VVÕž6­º¼m•ôÛçxõòøß/†y¶¼zñ™V[y¼^*³Ý—uUUe™ug�xË3,¼ßZñãø>7Ãm½Þ+2®¶êÌË+.®¶õY•™VfYeÛfxºËlÏw�^o^lñðñæÛǯ_ ª«ÇÎͪÏu™UUVx³33,¼g›¼Þïîø|lþº¼Ùµ—Ë*î®í¶î«k,»º««Õ|6ÛÅöøß[m½^îÛo�îø[uâënëöÞ¾ÖÞ=Þ+*îëkÖUU]x²ìʺ¶ì˲î̳jêìÏ­ó¯[ç|<|½Ý–][e–UVmeëj¬²ñ•–U–U›[Wy¾›zùÛmã×ñ}/›*˼]ÙUžlË*ªïfVÛfÞkl³o�™—›Ýîóy¶ÚÏvתñeÕ^3ÆUÕÕeµY•ž/•·Um—x˺¶ï7ÛÍîϽYãÍò÷^2¶®ñâ˺²Ë.ª«jªËmª¶î®ÚÚʪÏã¶ùÙý6Ý—›ÆxºÊ˶ïuU•mµ›Y·z²î¯Yæ«Æ[~�Áî÷|«ÅµµVx²Ë³Ç‹«º¶êʺʪñfÙYuv|oç¶Ï7÷ß ²²«=g¬«*³Ç‹º¬³Ç�™zËm¶¯�ð˼_/7�äñão7U–Öՙëo…egÃNJʬ̻6íªÛ×öy¿ øÞlͪ³*ʬ¬ÌñeUUeÙueÕ]m]•ãǯã¾ß ú¾7›ÍUÕz¬²ª«+eô¾·øûÍ]UW‹2¼[v]ךÊÊ­»íöó{¼”«¬ªË,Û³*¼y«kjë<ßËy»oô•—Yµæ«Í™eVx½gŠúÙü_oòÿÿÄÀÿÚ?jgÿÄ`p0€� @ÿÚ?±ß†^M–bG.d{¥ÈÜiïuÑ:I†Ÿ³¼Ã_™g/ ¾&6�†:z1Ødyè�æ.lcôc¯'.½3#ùÝFå&É>‰ÿÄÀÿÚ?jgÿÙtests/files/test.png000064400000000577150731646700010517 0ustar00‰PNG  IHDR22?ˆ±FIDATxÚíÚ=ªƒP†áã*ìÓÈ ² Á-¸ÁÂÊÆ*¥­+Ð=‚�Å,*o‘âr¹?’øw>ž|àñŒ3ãzDˆ‘£F‡ÓK�5rĈ`÷ç† ìM RÜöpG‰¶�%î[¸¢À[Ɉ×5HÐÂ6Ò"Yò …È`;É~â‚ ¶³ —OB<`ñx'Lˆ v0BÌ>Øì ²¹€vpÉœ{¢õ Hûß=SÀ>.?Ù rY Ý z - 1    Y j; !µ57%ˆtests/files/test.svg000064400000016243150731646700010527 0ustar00 tests/files/test.tar000064400000024000150731646700010504 0ustar00foo.json0000644000175000017500000000007613513647427012135 0ustar oliveroliver{ "require": { "intervention/image": "^1" } } tests/files/test.txt000064400000000004150731646700010533 0ustar00testtests/files/test.webp000064400000000314150731646700010655 0ustar00RIFFÄWEBPVP8 ¸Ð�*%°tºøøNøàèðÀ àÐ ð�Ò¿Ü€àÕnÀ6[—¬ˆ@þúïüÅ÷Štü7ËU'¡~L˜,Àò6•íhé{\¥Ý`Ì WÂiÚ+ÎPÿè\Ï); aè�hј §0ÞxÜ*Êl }!q>�”�PP ²ÚSDÿ쵨ٞ†\vC±Œû.Zˆ[ ‘ÿB% Ѽ2tests/files/test.xml000064400000000536150731646700010526 0ustar00 http://intervention.io/ tests/stubs/avi000064400000000020150731646700007551 0ustar00RIFFAVI tests/stubs/flac000064400000000010150731646700007676 0ustar00fLaCtests/stubs/gzip000064400000000003150731646700007744 0ustar00‹tests/stubs/heic000064400000000170150731646700007710 0ustar00 ftypheicmif1miafMiHBheic ¡meta"hdlrpict$dinfdref url pitests/stubs/heif000064400000000100150731646700007704 0ustar00ftypmif1mif1heicñmeta!hdlrpicttests/stubs/mkv000064400000000010150731646700007566 0ustar00Eߣtests/stubs/mp3_id3v1000064400000000004150731646700010501 0ustar00ÿûtests/stubs/mp3_id3v2000064400000000006150731646700010504 0ustar00ID3tests/stubs/mpeg-video000064400000000010150731646700011025 0ustar00³tests/stubs/ogg000064400000000010150731646700007545 0ustar00OggStests/stubs/pdf000064400000000006150731646700007547 0ustar00%PDF-tests/stubs/psd000064400000000005150731646700007563 0ustar008BPStests/stubs/rar000064400000000007150731646700007563 0ustar00Rar!tests/stubs/svg000064400000000227150731646700007602 0ustar00 tests/stubs/tiff000064400000000004150731646700007724 0ustar00II*tests/stubs/zip000064400000000004150731646700007576 0ustar00PK