All Projects → xymak → php-smartcrop-extension

xymak / php-smartcrop-extension

Licence: other
smartcrop implementation in php extension

Programming Languages

c
50402 projects - #5 most used programming language
M4
1887 projects
PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to php-smartcrop-extension

Ant php extension
PHP 扩展, 用于 PHP-FPM、FastCGI、LD_PRELOAD等模式下突破 disabled_functions
Stars: ✭ 85 (+400%)
Mutual labels:  php-extension
Cphalcon
High performance, full-stack PHP framework delivered as a C extension.
Stars: ✭ 10,534 (+61864.71%)
Mutual labels:  php-extension
xray
X-Ray - PHP Engine compiler hook API (new)
Stars: ✭ 19 (+11.76%)
Mutual labels:  php-extension
Ip2region
Ip2region is a offline IP location library with accuracy rate of 99.9% and 0.0x millseconds searching performance. DB file is ONLY a few megabytes with all IP address stored. binding for Java,PHP,C,Python,Nodejs,Golang,C#,lua. Binary,B-tree,Memory searching algorithm
Stars: ✭ 9,836 (+57758.82%)
Mutual labels:  php-extension
Php Rdkafka
Production-ready, stable Kafka client for PHP
Stars: ✭ 1,703 (+9917.65%)
Mutual labels:  php-extension
Ycdatabase
The lightest php database framework written in c language, built in php extension, for mysql
Stars: ✭ 130 (+664.71%)
Mutual labels:  php-extension
Gutenberg Parser Rs
An experimental Rust parser for WordPress Gutenberg post format
Stars: ✭ 76 (+347.06%)
Mutual labels:  php-extension
pdn-content-aware-fill
A Resynthesizer-based content aware fill Effect plugin for Paint.NET
Stars: ✭ 54 (+217.65%)
Mutual labels:  content-aware
V8js
V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
Stars: ✭ 1,659 (+9658.82%)
Mutual labels:  php-extension
Php V8
PHP extension for V8 JavaScript engine
Stars: ✭ 197 (+1058.82%)
Mutual labels:  php-extension
Ext Collections
Array manipulation extension for PHP.
Stars: ✭ 94 (+452.94%)
Mutual labels:  php-extension
Php Akm
Ahocorasick keyword match.
Stars: ✭ 116 (+582.35%)
Mutual labels:  php-extension
Pht
A new threading extension for PHP
Stars: ✭ 175 (+929.41%)
Mutual labels:  php-extension
Php Ext Collection
PHP collection extensions - PHP Version 7.x
Stars: ✭ 89 (+423.53%)
Mutual labels:  php-extension
nanobox-engine-php
Engine for running PHP apps on Nanobox
Stars: ✭ 20 (+17.65%)
Mutual labels:  php-extension
Php Rs
A library to build PHP extensions in Rust.
Stars: ✭ 81 (+376.47%)
Mutual labels:  php-extension
Php Zephir Parser
The Zephir Parser delivered as a C extension for the PHP language.
Stars: ✭ 129 (+658.82%)
Mutual labels:  php-extension
laravel-color-palette
Laravel Wrapper for @ksubileau/color-thief-php. Grabs the dominant color or a representative color palette from an image. Uses PHP and GD or Imagick.
Stars: ✭ 27 (+58.82%)
Mutual labels:  gd
php-bencode
C++ PHP extension which can boost the process of encoding and decoding of Bencode.
Stars: ✭ 16 (-5.88%)
Mutual labels:  php-extension
Php Psr
PHP extension providing the accepted PSR interfaces
Stars: ✭ 189 (+1011.76%)
Mutual labels:  php-extension

php-smartcrop-extension

smartcrop implementation in php-extension.

smartcrop finds optimal crops for images, based on Jonas Wagner's smartcrop.js.

Example

Installation

Make sure you have compiled PHP7 environment.

Additionally PHP GD extension is needed to be load into PHP.

This PHP extension can only work on Linux OS.

You can install it by running:

cd /path/to/php/extention/source/directory
https://github.com/xymak/php-smartcrop-extension.git
cd php-smartcrop-extension
phpize
./configure --prefix='/path/to/php/directory' --with-php-config='/path/to/php/config'
make && make install
echo "extension=smartcrop.so" >> /path/to/etc/php/php.d/smartcorp.ini

Example

<?php
//Convert to a image to gd resource
$im = imagecreatefromstring(file_get_contents('/path/to/a/image'));
//Target Size
$width = 400;
$height = 400;
//Call smartcrop function
$cim = smartcrop($im,$width,$height);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].