title: How to convert a jpg or gif file to PostScript with java
body: <p>I am creating a post script file and text and lines work good.  I need to put jpeg and gif images on it.  How do I read in the jpeg or gif file and convert it to post script data so that the image appears correctly?</p>
  
  <p>I found this on the internet but when I read in my jpeg and simply convert the file to hex bytes it doesn't appear correctly.</p>
  
  
  
  <pre><code>100 200 translate
  26 34 scale
  26 34 8 [26 0 0 -34 0 34]
  {&lt;
  ffffffffffffffffffffffffffffffffffffffffffffffffffff
  ff000000000000000000000000000000000000ffffffffffffff
  ff00efefefefefefefefefefefefefefefef0000ffffffffffff
  ...
  ff00efefefefefefefefefefefefefefefefefefefefefef00ff
  ff000000000000000000000000000000000000000000000000ff
  ffffffffffffffffffffffffffffffffffffffffffffffffffff
  &gt;}
  </code></pre>
  
  <p>image</p>
  
  <p>That second to last line is greater than symbol followed by curly braces.</p>
  
  <p>Thank you</p>