jeremias    2003/06/06 01:21:50

  Modified:    src/org/apache/fop/render/ps Tag: fop-0_20_2-maintain
                        PSRenderer.java
  Log:
  Fix for grayscale images (#20506)
  Submitted by: Zhong(George) Yi <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.15.2.19 +8 -2      xml-fop/src/org/apache/fop/render/ps/Attic/PSRenderer.java
  
  Index: PSRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/ps/Attic/PSRenderer.java,v
  retrieving revision 1.15.2.18
  retrieving revision 1.15.2.19
  diff -u -r1.15.2.18 -r1.15.2.19
  --- PSRenderer.java   2 Jun 2003 19:55:08 -0000       1.15.2.18
  +++ PSRenderer.java   6 Jun 2003 08:21:50 -0000       1.15.2.19
  @@ -617,6 +617,8 @@
               write("gsave");
               if (img.getColorSpace().getColorSpace() == ColorSpace.DEVICE_CMYK)
                   write("/DeviceCMYK setcolorspace");
  +            else if (img.getColorSpace().getColorSpace() == ColorSpace.DEVICE_GRAY)
  +                write("/DeviceGray setcolorspace");
               else
                   write("/DeviceRGB setcolorspace");
   
  @@ -685,7 +687,11 @@
                       }
                   }
                   out.write(imgmap);
  -                ((Finalizable)out).finalizeStream();
  +                if (out instanceof Finalizable) {
  +                    ((Finalizable)out).finalizeStream();
  +                } else {
  +                    out.flush();
  +                }
               } catch (IOException e) {
                   if (!ioTrouble)
                       e.printStackTrace();
  
  
  

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

Reply via email to