keiron      2002/08/19 04:54:53

  Modified:    src/org/apache/fop/image AbstractFopImage.java EPSImage.java
                        JpegImage.java XMLImage.java
               src/org/apache/fop/render/pdf PDFRenderer.java
  Log:
  load original data properly
  
  Revision  Changes    Path
  1.12      +11 -1     xml-fop/src/org/apache/fop/image/AbstractFopImage.java
  
  Index: AbstractFopImage.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/AbstractFopImage.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractFopImage.java     2 Aug 2002 08:47:02 -0000       1.11
  +++ AbstractFopImage.java     19 Aug 2002 11:54:52 -0000      1.12
  @@ -126,6 +126,12 @@
                   loaded = loaded | BITMAP;
               }
           }
  +        if(((type & ORIGINAL_DATA) != 0) && ((loaded & ORIGINAL_DATA) == 0)) {
  +            success = success && loadOriginalData(ua);
  +            if(success) {
  +                loaded = loaded | ORIGINAL_DATA;
  +            }
  +        }
           return success;
       }
   
  @@ -134,6 +140,10 @@
       }
   
       protected boolean loadBitmap(FOUserAgent ua) {
  +        return false;
  +    }
  +
  +    protected boolean loadOriginalData(FOUserAgent ua) {
           return false;
       }
   
  
  
  
  1.7       +2 -1      xml-fop/src/org/apache/fop/image/EPSImage.java
  
  Index: EPSImage.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/EPSImage.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EPSImage.java     27 Jun 2002 11:45:54 -0000      1.6
  +++ EPSImage.java     19 Aug 2002 11:54:53 -0000      1.7
  @@ -71,6 +71,7 @@
               bbox[2] = (int) epsData.bbox[2];
               bbox[3] = (int) epsData.bbox[3];
   
  +            loaded = loaded | ORIGINAL_DATA;
           }
       }
   
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/image/JpegImage.java
  
  Index: JpegImage.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/JpegImage.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JpegImage.java    27 Jun 2002 11:45:54 -0000      1.5
  +++ JpegImage.java    19 Aug 2002 11:54:53 -0000      1.6
  @@ -39,7 +39,7 @@
           super(href, imgReader);
       }
   
  -    protected boolean loadBitmap(FOUserAgent ua) {
  +    protected boolean loadOriginalData(FOUserAgent ua) {
           ByteArrayOutputStream baos = new ByteArrayOutputStream();
           ByteArrayOutputStream iccStream = new ByteArrayOutputStream();
           InputStream inStream;
  
  
  
  1.2       +2 -1      xml-fop/src/org/apache/fop/image/XMLImage.java
  
  Index: XMLImage.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/XMLImage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLImage.java     8 Mar 2002 11:00:19 -0000       1.1
  +++ XMLImage.java     19 Aug 2002 11:54:53 -0000      1.2
  @@ -29,6 +29,7 @@
           super(href, imgInfo);
           if(imgInfo.data instanceof Document) {
               doc = (Document)imgInfo.data;
  +            loaded = loaded | ORIGINAL_DATA;
           }
           ns = imgInfo.str;
       }
  
  
  
  1.115     +2 -2      xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java
  
  Index: PDFRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- PDFRenderer.java  19 Aug 2002 09:57:47 -0000      1.114
  +++ PDFRenderer.java  19 Aug 2002 11:54:53 -0000      1.115
  @@ -516,7 +516,7 @@
               FopPDFImage pdfimage = new FopPDFImage(fopimage, url);
               int xobj = pdfDoc.addImage(null, pdfimage).getXNumber();
               fact.releaseImage(url, userAgent);
  -        } else if ("image/jpg".equals(mime)) {
  +        } else if ("image/jpeg".equals(mime)) {
               if (!fopimage.load(FopImage.ORIGINAL_DATA, userAgent)) {
                   return;
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to