2
0

Image.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. * @package Zend_Pdf
  16. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  17. * @license http://framework.zend.com/license/new-bsd New BSD License
  18. */
  19. /** Zend_Pdf_Element_Object */
  20. require_once 'Zend/Pdf/Element/Object.php';
  21. /** Zend_Pdf_Element_Dictionary */
  22. require_once 'Zend/Pdf/Element/Dictionary.php';
  23. /** Zend_Pdf_Element_Name */
  24. require_once 'Zend/Pdf/Element/Name.php';
  25. /** Zend_Pdf_Resource */
  26. require_once 'Zend/Pdf/Resource.php';
  27. /**
  28. * Image abstraction.
  29. *
  30. * Class is named not in accordance to the name convention.
  31. * It's "end-user" class, but its ancestor is not.
  32. * Thus part of the common class name is removed.
  33. *
  34. * @package Zend_Pdf
  35. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  36. * @license http://framework.zend.com/license/new-bsd New BSD License
  37. */
  38. abstract class Zend_Pdf_Resource_Image extends Zend_Pdf_Resource
  39. {
  40. /**
  41. * Object constructor.
  42. */
  43. public function __construct()
  44. {
  45. parent::__construct('');
  46. $this->_resource->dictionary->Type = new Zend_Pdf_Element_Name('XObject');
  47. $this->_resource->dictionary->Subtype = new Zend_Pdf_Element_Name('Image');
  48. }
  49. /**
  50. * get the height in pixels of the image
  51. *
  52. * @return integer
  53. */
  54. abstract public function getPixelHeight();
  55. /**
  56. * get the width in pixels of the image
  57. *
  58. * @return integer
  59. */
  60. abstract public function getPixelWidth();
  61. /**
  62. * gets an associative array of information about an image
  63. *
  64. * @return array
  65. */
  66. abstract public function getProperties();
  67. }