All Projects → xymak → Smartcrop.php

xymak / Smartcrop.php

smartcrop implementation in PHP

Projects that are alternatives of or similar to Smartcrop.php

Color Thief Php
Grabs the dominant color or a representative color palette from an image. Uses PHP and GD, Imagick or Gmagick.
Stars: ✭ 564 (+1424.32%)
Mutual labels:  image-processing, gd
Php Legofy
Transform your images as if they were made out of LEGO bricks.
Stars: ✭ 161 (+335.14%)
Mutual labels:  image-processing, gd
Simpleimage
A PHP class that makes working with images as simple as possible.
Stars: ✭ 1,184 (+3100%)
Mutual labels:  image-processing, gd
Grafika
An image processing library for PHP
Stars: ✭ 838 (+2164.86%)
Mutual labels:  image-processing, gd
Google Images Download
Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!
Stars: ✭ 7,815 (+21021.62%)
Mutual labels:  image-processing
Tensorflow object counting api
🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
Stars: ✭ 956 (+2483.78%)
Mutual labels:  image-processing
Imgsquash
Simple image compression full website code written in node, react and next.js framework. Easy to deploy as a microservice.
Stars: ✭ 948 (+2462.16%)
Mutual labels:  image-processing
Pytorch Toolbelt
PyTorch extensions for fast R&D prototyping and Kaggle farming
Stars: ✭ 942 (+2445.95%)
Mutual labels:  image-processing
Extensionsindex
Slicer extensions index
Stars: ✭ 36 (-2.7%)
Mutual labels:  image-processing
Imagene
A General Purpose Image Manipulation Tool
Stars: ✭ 36 (-2.7%)
Mutual labels:  image-processing
Rembg
Rembg is a tool to remove images background.
Stars: ✭ 964 (+2505.41%)
Mutual labels:  image-processing
Graph Based Image Segmentation
Implementation of efficient graph-based image segmentation as proposed by Felzenswalb and Huttenlocher [1] that can be used to generate oversegmentations.
Stars: ✭ 31 (-16.22%)
Mutual labels:  image-processing
Albumentations
Fast image augmentation library and an easy-to-use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about the library: https://www.mdpi.com/2078-2489/11/2/125
Stars: ✭ 9,353 (+25178.38%)
Mutual labels:  image-processing
Smartcircle
✂️Automatically determine where to crop a circular image out of a rectangular.
Stars: ✭ 29 (-21.62%)
Mutual labels:  image-processing
Googlemapview
android google map view - imageView to make the map display process easier by entering latitude and longitude only by static map
Stars: ✭ 36 (-2.7%)
Mutual labels:  image-processing
Deep learning projects
Stars: ✭ 28 (-24.32%)
Mutual labels:  image-processing
Photon
⚡ Rust/WebAssembly image processing library
Stars: ✭ 963 (+2502.7%)
Mutual labels:  image-processing
Image Processing
Image Processing with Python
Stars: ✭ 34 (-8.11%)
Mutual labels:  image-processing
Geemap
A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and folium
Stars: ✭ 959 (+2491.89%)
Mutual labels:  image-processing
Rivuletpy
Robust 3D Neuron Tracing / General 3D tree structure extraction in Python for 3D images powered by the Rivulet2 algorithm. Pain-free Install & use in 5 mins.
Stars: ✭ 32 (-13.51%)
Mutual labels:  image-processing

smartcrop.php

smartcrop implementation in PHP.

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

Example

Installation

Make sure you have PHP environment.

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

Copy smartcrop.php to your directory

Example

<?php
require(__DIR__ . '/smartcrop.php');
use xymak\image;
//Get a instance
$smartcrop = new xymak\image\smartcrop('/path/to/a/image',[
        'width' => 400,
        'height' => 400
] );
//Analyse the image and get the optimal crop scheme
$res = $smartcrop->analyse();
//Generate a crop based on optimal crop scheme
$smartcrop->crop($res['topCrop']['x'], $res['topCrop']['y'], $res['topCrop']['width'], $res['topCrop']['height']);
//Output the image
$smartcrop->output();

Note

The performance of smartcrop.php on PHP5 is far lower than on PHP7.

If you want to for smartcrop on real time online image processing, php-smartcrop-extension is a better choice for its high performance.

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].