You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2003/03/27 11:50:55 UTC

cvs commit: xml-fop/src/java/org/apache/fop/pdf PDFImage.java

jeremias    2003/03/27 02:50:54

  Modified:    src/java/org/apache/fop/pdf PDFImage.java
  Log:
  Image implementation can now indicate if it is DCT encoded (JPEGs).
  Image implementation just outputs its raw content to an OutputStream. Filtering is done by the XObject.
  Image implementation can now indicate which filter set to use (for encoding optimizations like for JPEGs)
  
  Revision  Changes    Path
  1.2       +21 -4     xml-fop/src/java/org/apache/fop/pdf/PDFImage.java
  
  Index: PDFImage.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/pdf/PDFImage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PDFImage.java	11 Mar 2003 13:05:09 -0000	1.1
  +++ PDFImage.java	27 Mar 2003 10:50:54 -0000	1.2
  @@ -51,6 +51,7 @@
   package org.apache.fop.pdf;
   
   import java.io.IOException;
  +import java.io.OutputStream;
   
   /**
    * Interface for a PDF image.
  @@ -68,9 +69,11 @@
   
       /**
        * Setup the PDF image for the current document.
  -     * Some image formats may need to access the document.
  +     * Some image formats may need to access the document (for example to
  +     * add an ICC profile to the document).
        *
        * @param doc the PDF parent document
  +     * @todo Remove this and deletgate to the XObject
        */
       void setup(PDFDocument doc);
   
  @@ -111,6 +114,13 @@
       boolean isPS();
   
       /**
  +     * Check if this image is a DCT encoded image (for JPEG images).
  +     *
  +     * @return true if this is a DCT image
  +     */
  +    boolean isDCT();
  +
  +    /**
        * Check if this image has a transparent color transparency.
        *
        * @return true if it has transparency
  @@ -141,12 +151,12 @@
       // get the image bytes, and bytes properties
   
       /**
  -     * Get the data stream containing the image contents.
  +     * Writes the raw, unencoded contents of the image to a given output stream.
        *
  +     * @param out OutputStream to write to
        * @throws IOException if there creating stream
  -     * @return the PDFStream containing the image data
        */
  -    PDFStream getDataStream() throws IOException;
  +    void outputContents(OutputStream out) throws IOException;
   
       /**
        * Get the ICC stream for this image.
  @@ -154,6 +164,13 @@
        * @return the ICC stream for this image if any
        */
       PDFICCStream getICCStream();
  +
  +    /**
  +     * Returns a hint in form of a String (Possible values from PDFFilterList)
  +     * indicating which filter setup should be used to encode the object.
  +     * @return the filter setup hint
  +     */
  +    String getFilterHint();
   
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org