Git Product home page Git Product logo

placephant's Introduction

##placephant

This is a very simple placeholder project featuring lovely elephpants. It's built with Silex+Flint.

You can use this project as a base for your very own image placeholder. Just change the settings in the app/config/config.yml file and use your own image resources.

###Usage

You can point the src of your images direct to http://placephant.com with the desired width and height as path parameters, as shown below:

300x250 colored image: <img src="http://placephant.com/300/250"/>

100x100 square colored image (just need to provide the width): <img src="http://placephant.com/100"/>

300x250 black and white image: <img src="http://placephant.com/g/100/200"> <img src="http://placephant.com/100/200?filter=bw">

verbose mode - shows the image dimensions on b&w image <img src="http://placephant.com/v/100/200">

300x250 sepia image: <img src="http://placephant.com/300/250?filter=sepia"/>

###Requirements (dev)

Placephant requires php >= 5.4 and the php5-imagick extension.

###Vagrant

A Vagrant setup is provided, using the Ansible Provisioner.

####Instructions

You'll need Vagrant, VirtualBox and Ansible. This setup was tested on Ubuntu 12.04 with Vagrant 1.4.2, VirtualBox 4.3.6 and Ansible 1.4.1 .

Linux users will also need nfs-common and nfs-kernel-server in order to use the NFS shared folders (increases performance).

After the vagrant up, the application will be running at 192.168.33.101 .

####Troubleshooting

Ansible hangs forever on composer install : hit ctrl+c to cancel the provision, then run it again. It will finish the other tasks, then you can log in and run composer install manually. This might be caused by composer asking for github credentials, or some other error from github - so its better to login with vagrant ssh and check what's going on.

placephant's People

Contributors

daianeaze avatar drdub avatar erikaheidi avatar henrikbjorn avatar rdohms avatar wyrihaximus avatar ztec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

placephant's Issues

Different images

It should be nice to have the opportunity to get different images with the same sizes.

avoid text in images with some dependencies

my suggestion is maybe to avoid depending on a specific font? not sure how to solve it, may be related to the library rather than this app, i run it like cd web; php -S localhost:9090

php: unable to read font `/usr/local/share/ghostscript/fonts/b018015l.pfb' @ error/annotate.c/RenderFreetype/1126.
php: Postscript delegate failed `/var/tmp/magick-52020A4QiQ6KTq262': No such file or directory @ error/ps.c/ReadPSImage/837.
[Fri Dec 20 04:55:21 2013] Uncaught PHP Exception ImagickException: "Failed to query the font metrics" at /Users/cordoval/Sites/libs/placephant/vendor/imanee/imanee/src/Imanee/Image.php line 191

verbose mode

Verbose mode writes the image size in the image, like in placeholder.it . helpful for layout designers / developers.

Use of Imagine lib

Hi.

Would you consider the use of the Imagine library?

It already supports the image filters/effects you mention in the README, only requires PHP 5.3+, can use GD2/Gmagick/Imagick, and has a pretty nice API.

I'm happy to integrate if so.

Choose which image to display

There are cases where we might want to display multiple images with the same dimensions. It would be interesting to be able to choose a specific image independently of the dimensions.

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.