Skip to content

Instantly share code, notes, and snippets.

View jorgelbg's full-sized avatar
:octocat:
coding

Jorge Luis Betancourt jorgelbg

:octocat:
coding
View GitHub Profile
<?php
class SmartSquareFilter extends AbstractImagickFilter
{
protected function doApply(\Imagick $im)
{
$target = $im->getImageGeometry();
if ($target['width'] === $target['height']) {
// return early if already square
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>search as you type</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<style>