![]() ![]() ![]() Please refer to the repo for API changes and the latest features. ![]() January 10, 2017: SimpleImage 3.0 has been released. Please submit all issues and contributions to the project page. This project is actively maintained on GitHub. overlay() - overlay one image onto another to create a watermark effect.sepia() - apply a simulated sepia effect.pixelate() - pixelate the image to blocks of the specified size.blur() - apply selective or gaussian blur to the image.This function reads the image from the specified file and returns a SimpleImage object that can be stored in a variable to refer to the image. mean_remove() - apply the mean removal filter The SimpleImage code used in CS106A provides you with some basic digital image processing tools: Reading an image from a filename.contrast() - adjust the image's contrast.brightness() - adjust the image's brightness.desaturate() - convert the image to grayscale.square_crop() - trim the image to a square and resize to the specified size.crop() - crop an image from x1/y1 to x2/y2.best_fit() - proportionally resizes an image to fit within the specified width/height Simple Image by Vincent Faigt 3.fit_to_height() - proportionally resizes an image to the specified height.Thousands of students have used assignments based off of SimpleImage. fit_to_width() - proportionally resizes an image to the specified width SimpleImage.js is a simple image library with a minimal API, well-suited for CS0/CS1-style courses.resize() - resizes an image to the specified width/height.auto_orient() - adjusts the orientation based on the image's EXIF data.rotate() - rotates an image at the specified angle.flip() - flips an image vertically or horizontally.The following two lines will load image.jpg, flip it horizontally, rotate it 90 degrees, shrink it to fit within a 320x200 box, apply a sepia effect, convert it to a GIF, and save it to result.gif: $img = new SimpleImage('image.jpg') This class takes the headache out of dealing with images and features over 25 useful methods. If you love working with PHP but hate the GD library, you'll love the Simple Image PHP class I'm releasing today. I keep posts like this around for historical purposes and to prevent link rot, so please keep this in Heads up! This post was written in 2011, so it may contain information that is no longerĪccurate. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |