1 Reply Latest reply: Nov 24, 2011 4:51 AM by Dr.Adam RSS

    How to render the color ps as Gray scale ps

    vaidyanet Community Member

      Hi I generate the color PS using the color images as given below. I am using the DCTDecode filter so that I can embed the JPEG images to the postscript. Now I get the correct postscript with the color image. If I want to render the postscript as Gray scale,what additional changes I need to do? I tried with ProcessColorModel but no success.

       

      Thanks in advance.

       

      /RawData currentfile /ASCII85Decode filter def

      /Data RawData << >> /DCTDecode filter def

      18.0 504.0 translate

      360.0 270.0 scale

      /DeviceRGB setcolorspace

      { << /ImageType 1

           /Width 800

           /Height 600

           /ImageMatrix [ 800 0 0 -600 0 600 ]

           /DataSource Data

           /BitsPerComponent 8

           /Decode [0 1 0 1 0 1]

        >> image

        Data closefile

        RawData flushfile

        grestore

        showpage

      } exec

      s4IA0!"_al8O`[\!<<*#!!*'"s4[N@!!ic5#6k>;#6tJ?#m^kH'FbHY$Odmc'+Yct)BU"@)B9_>,VCGe

      +tOrY*%3`p/2/e81c-:%3B]>W4>&EH1B6)/6NIK"#n.1M(_$ok1*IV\1,:U?1,:U?1,:U?1,:U?1,:U?

      1,:U?1,:U?1,:U?1,:U?1,:U?1,:U?1,:U?1,AmF!"fJ<=9BZJ!?qLF&HMtG!WU(<*rl9A"T\W)!<E3$

      z!!!!"!WrQ/"pYD?$4HmP!4<@<!W`B*!X&T/"U"r.!!.KK!WrE*&Hrdj0gQ!W;.0\RE>10ZOeE%*6F"?

      A;UOtZ1LbBV#mqFa(`=5<-7:2j.Ps"@2`NfY6UX@47n?3D;cHat='/U/@q9._B4u!oF*)PJGBeCZK7nr

      5LPUeEP*;,qQC!u,R\HRQV5C/hWN*81['d?O\@K2f_o0O6a2lBFdaQ^rf%8R-g>V&OjQ5OekiqC&o(2M

      Hp@n@XqZ"J6*ru?D!<E3%!<E3%!<<*"!!!!"!WrQ/"pYD?$4HmP!4<C=!W`?*"9Sc3"U"r.!<RHF!<N?

        • 1. Re: How to render the color ps as Gray scale ps
          Dr.Adam Community Member

          The most logical Answer is use /Decode [0 1]   instead of /Decode  [0 1 0 1 0 1] and  /DeviceGray setcolorspace   

          But it will not work; you need to find out the JPG type/mode grayscale,RGB or CMYK and then chose the proper Decode & Devicegray accordingly.

          This is how the PS JPG Filter process the file , must know in advance the correct  color depth otherwise it will go wrong.

           

          Dr. Adam