mariuswilms / mm Goto Github PK
View Code? Open in Web Editor NEWThe PHP media library: media processing and MIME-Type/extension guessing.
License: Other
The PHP media library: media processing and MIME-Type/extension guessing.
License: Other
Instead of returning "document" Mime_Type::guessName("path/pdf.pdf") returns "generic". This will not happen in all other cases tested:
Example code:
use mm\Mime\Type;
require_once 'libs/vendor/davidpersson/mm/bootstrap.php';
$file = "files/pdf.pdf";
// one bad case
echo Mime_Type::guessName($file); // returns "generic"
// four good cases
$filename_only = "pdf.pdf";
echo Mime_Type::guessName($filename_only); // returns "document"
$mimeType = "application/pdf";
echo Mime_Type::guessName($mimeType); // returns "document"
$mimeType = Mime_Type::guessType($file);
echo Mime_Type::guessName($mimeType); // returns "document"
$handle = fopen($file, 'r');
echo Mime_Type::guessName($handle); // returns "document"
When uploading a GIF image I got this error:
Warning (2): imagecolorsforindex() [function.imagecolorsforindex]: Color index 235 out of range [APP/plugins/media/libs/mm/src/Media/Process/Adapter/Gd.php, line 295]
The warning is:
Debugger::handleError() - CORE/cake/libs/debugger.php, line 306
imagecolorsforindex - [internal], line ??
Media_Process_Adapter_Gd::adjustTransparency() - APP/plugins/media/libs/mm/src/Media/Process/Adapter/Gd.php, line 295
Media_Process_Adapter_Gd::resize() - APP/plugins/media/libs/mm/src/Media/Process/Adapter/Gd.php, line 212
Media_Process_Image::fitInside() - APP/plugins/media/libs/mm/src/Media/Process/Image.php, line 52
Media_Process_Image::fit() - APP/plugins/media/libs/mm/src/Media/Process/Image.php, line 32
GeneratorBehavior::makeVersion() - APP/plugins/media/models/behaviors/generator.php, line 266
ModelBehavior::dispatchMethod() - CORE/cake/libs/model/model_behavior.php, line 171
BehaviorCollection::dispatchMethod() - CORE/cake/libs/model/model_behavior.php, line 467
Model::call_() - CORE/cake/libs/model/model.php, line 496
Overloadable::__call() - CORE/cake/libs/overloadable_php5.php, line 50
Attachment::makeVersion() - APP/plugins/media/models/behaviors/generator.php, line 169
GeneratorBehavior::make() - APP/plugins/media/models/behaviors/generator.php, line 169
GeneratorBehavior::afterSave() - APP/plugins/media/models/behaviors/generator.php, line 120
ModelBehavior::dispatchMethod() - CORE/cake/libs/model/model_behavior.php, line 171
BehaviorCollection::trigger() - CORE/cake/libs/model/model_behavior.php, line 494
Model::save() - CORE/cake/libs/model/model.php, line 1363
Sending file to David separately.
Add ability to convert audio to an image media. Should be added to all audio adapters where 3rd party libs support it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.