Basic Image Manipulation PHP

1,840 views

Published on

Learn the basics of creating, converting, and acquiring information on images.

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,840
On SlideShare
0
From Embeds
0
Number of Embeds
25
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Basic Image Manipulation PHP

  1. 1. Basic Image Creation and Manipulation
  2. 2. OverviewObjectiveLearn the basics of creating, converting, and acquiringinformation on images.Requirements Installed version of ImagickEstimated Time10 minutes www.prodigyview.com
  3. 3. Follow Along With A Code Example1. Download a copy of the example code at www.prodigyview.com/source.2. Install the system in an environment you feel comfortable testing in.3. Proceed to examples/avi/ImageBasics.php http://www.prodigyview.com
  4. 4. Drawing A Rectangle The most basic image we can draw is a rectangle. The rectangle 1. Set the image width, height, and color.2.Returns the full path location of the image 3. Remove part of the image path 4. Display the image
  5. 5. RectangleThe rectangle that will be drawn should like these two.1, The location the image was saved 2. The image displayed
  6. 6. Ellipse A more complex shape we can drawn is an ellipse, which is a circular shape.1. Ellipse Width 2. Ellipse Height 3. Ellipse Color4. The location the ellipse was saved
  7. 7. EllipseThe ellipses that were drawn from the previous codeshould look like this
  8. 8. Width and Height Common attributes of an image is the size and the width.1. The location of the image on file file system 2. Get the image width 3. Get the image height www.prodigyview.com
  9. 9. Convert Image FormatThe last thing we are going to do is convert an image’sformat. Converting the formats will try to keep the imageclose to the quality of the original.1. The location of the current image 2. The format to convert it to 3. The location of the file converted file
  10. 10. Convert ImagesThe converted PNG The converted GIF www.prodigyview.com
  11. 11. Review1. Create a rectangular image with PVImage::drawImage() method2. Draw an ellipse with PVImage::drawEllipse()3. Get the height of an image with PVImage::getImageHeight()4. Get the width of an image with PVImage::getImageWidth()5. Convert image formats with PVImage::convertImageFormat() www.prodigyview.com
  12. 12. API ReferenceFor a better understanding of the image manipulation, checkout the api at the two links below.PVImage More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com

×