Snipe.Net - Geeky Stuff
Twitter
Currently: @gkra s/just like/be/ in reply to gkra 10 mins ago

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 = “myimage.jpg”
$path [...]


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 = $current_size[0];
$current_img_height = $current_size[1];
$image_base = explode(“.”, $current_file);
// this part gets [...]