Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Image Component Proposal

Proposed Component Name Zend_Image
Developer Notes
Proposers Eric Potvin
Revision 0.1 - July 22, 2006: First Release. (wiki revision: 11)

Table of Contents

1. Overview

Zend_Image, Zend_Image_Validation, Zend_Image_Utility and Zend_Image_Thumbnail are the classes to help you to manipulate image for any purpose.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • GD PHP library active.

4. Dependencies on Other Framework Components

  • Zend_Exception

5. Theory of Operation

  • Zend_Image must be instantiated.
  • Zend_Image_Validation must be instantiated.
  • Zend_Image_Utility does not need to me instantiated.
  • Zend_Image_Thumbnail must be instantiated.

6. Milestones / Tasks

zone: Missing {zone-data:milestones}

7. Class Index

  • Zend_Image
  • Zend_Image_Validation
  • Zend_Image_Utility
  • Zend_Image_Thumbnail

8. Use Cases


... (see good use cases book)

9. Class Skeletons



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 02, 2006

    <p>I'm wondering if it might not be prudent to establish a common Zend_Image API and then to allow for multiple backends. In addition to GD, ImageMagick is another frequently used backend for which someone may at some point wish to implement a core module. The API detailed here looks very good in terms of being backend-independent and it should only take the addition of a method to specify which backend to use in order to implement what I'm describing. Perhaps an interface Zend_Image_API and a method Zend_Image::setBackend(Zend_Image_API). Thoughts?</p>

  2. Aug 29, 2006


    <p>setPercentage - have not right idea. <br />
    If i want resize image by one edge, how i can do it? <br />
    It's needed when in template all images must have equals height (getted by percent from original size).</p>

    <p>Same in "setSize" <br />
    usage, i know only result height, and width may be either<br />
    So, method must be like: setSize(integer $width=null, integer $height=null)</p>

    <p>And another one question: Let me know how resizing image with crop or save original geometry? </p>

    <p>PS: Don't kick me for my english <ac:emoticon ac:name="smile" /> </p>

  3. Oct 24, 2006


    <p>your proposal looks good. I'd certainly use it.</p>

    <p>About your Thumbnail class. It would be nice to have a method that resizes the image in one of three ways (either given as parameter, or as several methods):</p>
    <ul class="alternate">
    <li>resize until either height or width fits within given boundary and crop the image (you'll make a center cutout, but image width and height are predictable)</li>
    <li>resize until both height and width fit within given boundaries (meaning that the exact size of the image is not predictable, but different for each image).</li>
    <li>lose original geometry and fit the image in the boundaries (thus messing up the original)</li>

    <p>Additionally, as Eugene mentioned, it would be nice to be able to enter either one of height and width.</p>

    <p>If you need any help with the implementation, let me know: <last name></p>

  4. Nov 14, 2006

    <ac:macro ac:name="note"><ac:parameter ac:name="title">Proposal not being considered</ac:parameter><ac:rich-text-body>
    <p>This proposal has been reviewed. The proposal describes functionality that is very similar to the existing PHP interfaces for ImageMagick or GD.</p>

    <p>We are not considering this for inclusion in the Zend Framework at this time.</p>

    <p>However, working on image-manipulation for PHP is a great thing to do. We encourage you to get involved with the ImageMagick project: <a class="external-link" href=""></a></p></ac:rich-text-body></ac:macro>