Snipe.Net - Geeky Stuff

Posts Tagged ‘image manipulation’


Tilt-Shift Photos (and How to Fake Them)

Tilt-shift photography (also known in the industry as “swing and tilt”) is a method by which photographers can take an aerial shot of a real-life place that makes it look as though it’s a miniature model. It’s a fascinating effect, and I have always found it interesting how the lens can fool the eye into [...]


Cropped Thumbnails using PHP and the GD Library

This code will allow you to create a thumbnail from a segment of the image. In some situations, you want to thumbnail an entire image – but other times, you may want only a piece – for example if you wish to generate square thumbnail images regardless of whether or not the original image is [...]


Dynamic Watermarks/Text Overlay on Images in PHP

This code can be useful for a number of things, such as making dynamic banners or for adding a copyright type of watermark to photographs or artwork (as we do in snipe gallery). As usual, this will not work for gifs unless you have a version of gd that lets you do that (cuz the [...]


Dynamic thumbnailing with PHP and the GD library

Although there are loads of ways you can do this, for this example, we’re assuming that the fullsize image is located in a directory called “images”, and the thumbnails will have the same name as the fullsize, but will be copied into a directory called “thumbs”. <?php // find out the current size info $photo_filename [...]


Dynamic thumbnailing with PHP and Imagemagick

This code formatting is a little off, since the WYSIWG editor seems to have eaten part of it. Sorry. <?php /* ———————————————- */ /* ———— BEGIN PHP SNIPPET —————-*/ /* ———————————————- */ // specify your file details $current_file = “image.jpg”; $max_width = “150″; // get the current info on the file $current_size = getimagesize($current_file); $current_img_width [...]