GithubHelp home page GithubHelp logo

imclab / crop-border-from-image Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pawelantczak/crop-border-from-image

0.0 1.0 0.0 142 KB

This class can be used to crop images by removing common color borders.

Home Page: http://www.phpclasses.org/package/5181-PHP-Crop-images-by-removing-common-color-borders.html

crop-border-from-image's Introduction

Rmove Border From Image

This class can be used to crop images by removing common color borders.

It can load a picture and scan its border pixels to determine how thick is the border.

The sensibility level that is used to determine which pixels are in the border is configurable.

The class can crop the image be keeping on the interior inside the image border.

The resulting cropped image can be displayed in JPEG, PNG or GIF format, saved to a file or embedded in an HTML page.

Award

Class won "PHP Programming Innovation Award" on phpclasses.org. Link.

Usage

require "removeBorderFromImage.php";
$rbfi = new removeBoderFromImage("img.jpg",0.95); //Color restrict factor, bigger multiplier = bigger crop area
$rbfi->saveImage("c:\\\\cropped", "png");         //Saves cropped image; available formats: png,gif,jpg
$rbfi->showImage();                               //Sends cropped picture to browser
$cropped = $rbfi->getImage();                     //Returns gd2 internal format image

crop-border-from-image's People

Contributors

pawelantczak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.