![]() Sepia effect (simulated) $img-> sepia() Pixelate using 8px blocks $img-> pixelate( 8) Smooth filter (-10 to 10) $img-> smooth( 5) Gaussian blur (two passes) $img-> blur( 'gaussian', 2) Selective blur (one pass) $img-> blur() Mean removal filter $img-> mean_remove() Colorize red at 50% opacity $img-> colorize( '#FF0000'. Desaturate (grayscale) $img-> desaturate() Fill image with white color $img-> fill( '#fff') Shrink the image proportionally to fit inside a 500x500 box $img-> best_fit( 500, 500) Shrink the image to the specified height while maintaining proportion (height) $img-> fit_to_height( 200) Shrink the image to the specified width while maintaining proportion (width) $img-> fit_to_width( 320) Trim the image and resize to exactly 100x75, keeping the top* of the image $img-> thumbnail( 100, 75, 'top') Trim the image and resize to exactly 100x75 $img-> thumbnail( 100, 75) Adjust the orientation if needed (physically rotates/flips the image based on its EXIF 'Orientation' property) $img-> auto_orient() Rotate the image 90 degrees clockwise $img-> rotate( 90) Flip the image horizontally (use 'y' to flip vertically) $img-> flip( 'x') You can load an image when you instantiate a new SimpleImage object: This class requires PHP 5.3 and PHP GD library. Convert between GIF, JPEG, and PNG formats.Overlay one image onto another (watermarking).Desaturate, colorize, pixelate, blur, etc.Resize images (free resize, resize to width, resize to height, resize to fit). ![]() ![]() It 90 degrees clockwise, shrink it to fit within a 320x200 box, apply a sepiaĮffect, convert it to a GIF, and save it to result.gif. The two lines inside the try block load image.jpg, flip it horizontally, rotate ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |