Image.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Pdf
  17. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /** Zend_Pdf_Element_Object */
  22. require_once 'Zend/Pdf/Element/Object.php';
  23. /** Zend_Pdf_Element_Dictionary */
  24. require_once 'Zend/Pdf/Element/Dictionary.php';
  25. /** Zend_Pdf_Element_Name */
  26. require_once 'Zend/Pdf/Element/Name.php';
  27. /** Zend_Pdf_Resource */
  28. require_once 'Zend/Pdf/Resource.php';
  29. /**
  30. * Image abstraction.
  31. *
  32. * Class is named not in accordance to the name convention.
  33. * It's "end-user" class, but its ancestor is not.
  34. * Thus part of the common class name is removed.
  35. *
  36. * @package Zend_Pdf
  37. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  38. * @license http://framework.zend.com/license/new-bsd New BSD License
  39. */
  40. abstract class Zend_Pdf_Resource_Image extends Zend_Pdf_Resource
  41. {
  42. /**
  43. * Object constructor.
  44. */
  45. public function __construct()
  46. {
  47. parent::__construct('');
  48. $this->_resource->dictionary->Type = new Zend_Pdf_Element_Name('XObject');
  49. $this->_resource->dictionary->Subtype = new Zend_Pdf_Element_Name('Image');
  50. }
  51. /**
  52. * get the height in pixels of the image
  53. *
  54. * @return integer
  55. */
  56. abstract public function getPixelHeight();
  57. /**
  58. * get the width in pixels of the image
  59. *
  60. * @return integer
  61. */
  62. abstract public function getPixelWidth();
  63. /**
  64. * gets an associative array of information about an image
  65. *
  66. * @return array
  67. */
  68. abstract public function getProperties();
  69. }