/framework/vendor/zend/Zend/Pdf/Resource/Image.php

http://zoop.googlecode.com/ · PHP · 77 lines · 15 code · 11 blank · 51 comment · 0 complexity · 17d66542551ce8d2b0df2ceab65c9fe5 MD5 · raw file

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