You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FopImage.java 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. // Author: Eric SCHAEFFER
  8. // Description: represent an image object
  9. package org.apache.fop.image;
  10. import org.apache.fop.datatypes.ColorSpace;
  11. import org.apache.fop.pdf.PDFColor;
  12. import org.apache.fop.pdf.PDFFilter;
  13. import org.apache.fop.fo.FOUserAgent;
  14. public interface FopImage {
  15. public static final int DIMENSIONS = 1;
  16. public static final int ORIGINAL_DATA = 2;
  17. public static final int BITMAP = 4;
  18. public String getMimeType();
  19. /**
  20. * Load particular inforamtion for this image
  21. * This must be called before attempting to get
  22. * the information.
  23. * @return boolean true if the information could be loaded
  24. */
  25. public boolean load(int type, FOUserAgent ua);
  26. // Ressource location
  27. public String getURL();
  28. // image size
  29. public int getWidth();
  30. public int getHeight();
  31. // DeviceGray, DeviceRGB, or DeviceCMYK
  32. public ColorSpace getColorSpace();
  33. // bits per pixel
  34. public int getBitsPerPixel();
  35. // For transparent images
  36. public boolean isTransparent();
  37. public PDFColor getTransparentColor();
  38. // get the image bytes, and bytes properties
  39. // get uncompressed image bytes
  40. public byte[] getBitmaps();
  41. // width * (bitsPerPixel / 8) * height, no ?
  42. public int getBitmapsSize();
  43. // get compressed image bytes
  44. // I don't know if we really need it, nor if it
  45. // should be changed...
  46. public byte[] getRessourceBytes();
  47. public int getRessourceBytesSize();
  48. // return null if no corresponding PDFFilter
  49. public PDFFilter getPDFFilter();
  50. }