<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642</link>
    <title>MATLAB Central Newsreader - Binary images and EPS?</title>
    <description>Feed for thread: Binary images and EPS?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 13 Jun 2009 21:03:01 -0400</pubDate>
      <title>Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657085</link>
      <author>Christopher Hummersone</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I have some binary images/plots (black and white) that I wish to print to eps files for use in LaTeX.  The problem is that the rendering engines (Painters and OpenGL) interpolate to greyscale, which is not desirable.  The zbuffer renderer produces binary images but then the fonts also become quantised and hence look horrible!  Does anyone know of an alternative method?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Chris</description>
    </item>
    <item>
      <pubDate>Sun, 14 Jun 2009 21:22:01 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657221</link>
      <author>Oliver Woodford</author>
      <description>&quot;Christopher Hummersone&quot; &amp;lt;wheely_chairs@hotmail.com&amp;gt; wrote in message &amp;lt;h11465$kis$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have some binary images/plots (black and white) that I wish to print to eps files for use in LaTeX.  The problem is that the rendering engines (Painters and OpenGL) interpolate to greyscale, which is not desirable.  The zbuffer renderer produces binary images but then the fonts also become quantised and hence look horrible!  Does anyone know of an alternative method?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Chris&lt;br&gt;
&lt;br&gt;
How are you generating the plots? If they're images, make sure you use image and not pcolor.</description>
    </item>
    <item>
      <pubDate>Sun, 14 Jun 2009 22:25:02 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657230</link>
      <author>Christopher Hummersone</author>
      <description>Thanks for your reply Oliver.  I am using imagesc and not pcolor to plot 2-D [logical] matrices...</description>
    </item>
    <item>
      <pubDate>Mon, 15 Jun 2009 10:25:18 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657335</link>
      <author>Oliver Woodford</author>
      <description>&quot;Christopher Hummersone&quot; &amp;lt;wheely_chairs@hotmail.com&amp;gt; wrote in message &amp;lt;h13tbu$pr6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Thanks for your reply Oliver.  I am using imagesc and not pcolor to plot 2-D [logical] matrices...&lt;br&gt;
&lt;br&gt;
I can't replicate the interpolation you're seeing. Can you post a test script to generate a figure in which you see this?&lt;br&gt;
&lt;br&gt;
Oliver</description>
    </item>
    <item>
      <pubDate>Tue, 16 Jun 2009 08:17:01 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657641</link>
      <author>Christopher Hummersone</author>
      <description>Here is an example of the code I'm using:&lt;br&gt;
&lt;br&gt;
z = rand(10);&lt;br&gt;
z(z&amp;lt;0.5) = 0;&lt;br&gt;
z(z&amp;gt;=0.5) = 1;&lt;br&gt;
&lt;br&gt;
figure;&lt;br&gt;
imagesc(z)&lt;br&gt;
colormap([1 1 1; 0 0 0]);&lt;br&gt;
colorbar&lt;br&gt;
print('-f1','-deps2','Interpolated.eps')&lt;br&gt;
print('-f1','-deps2','-zbuffer','Quantised.eps')&lt;br&gt;
&lt;br&gt;
Note that the images I'm working with are much bigger.  In the interpolated version the interpolation should be quite obvious - on the colorbar and in the figure.  The text looks as you would expect.  In the quantized version the fonts are heavily quantized and when I load the file onto my windows machine I get aliasing problems too.&lt;br&gt;
&lt;br&gt;
Many thanks,&lt;br&gt;
&lt;br&gt;
Chris</description>
    </item>
    <item>
      <pubDate>Tue, 16 Jun 2009 08:17:01 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657642</link>
      <author>Christopher Hummersone</author>
      <description>Here is an example of the code I'm using:&lt;br&gt;
&lt;br&gt;
z = rand(10);&lt;br&gt;
z(z&amp;lt;0.5) = 0;&lt;br&gt;
z(z&amp;gt;=0.5) = 1;&lt;br&gt;
&lt;br&gt;
figure;&lt;br&gt;
imagesc(z)&lt;br&gt;
colormap([1 1 1; 0 0 0]);&lt;br&gt;
colorbar&lt;br&gt;
print('-f1','-deps2','Interpolated.eps')&lt;br&gt;
print('-f1','-deps2','-zbuffer','Quantised.eps')&lt;br&gt;
&lt;br&gt;
Note that the images I'm working with are much bigger.  In the interpolated version the interpolation should be quite obvious - on the colorbar and in the figure.  The text looks as you would expect.  In the quantized version the fonts are heavily quantized and when I load the file onto my windows machine I get aliasing problems too.&lt;br&gt;
&lt;br&gt;
Many thanks,&lt;br&gt;
&lt;br&gt;
Chris</description>
    </item>
    <item>
      <pubDate>Tue, 16 Jun 2009 08:44:02 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657653</link>
      <author>Oliver Woodford</author>
      <description>&quot;Christopher Hummersone&quot; &amp;lt;wheely_chairs@hotmail.com&amp;gt; wrote in message &amp;lt;h17kdt$olf$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Here is an example of the code I'm using:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; z = rand(10);&lt;br&gt;
&amp;gt; z(z&amp;lt;0.5) = 0;&lt;br&gt;
&amp;gt; z(z&amp;gt;=0.5) = 1;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; figure;&lt;br&gt;
&amp;gt; imagesc(z)&lt;br&gt;
&amp;gt; colormap([1 1 1; 0 0 0]);&lt;br&gt;
&amp;gt; colorbar&lt;br&gt;
&amp;gt; print('-f1','-deps2','Interpolated.eps')&lt;br&gt;
&amp;gt; print('-f1','-deps2','-zbuffer','Quantised.eps')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Note that the images I'm working with are much bigger.  In the interpolated version the interpolation should be quite obvious - on the colorbar and in the figure.  The text looks as you would expect.  In the quantized version the fonts are heavily quantized and when I load the file onto my windows machine I get aliasing problems too.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Many thanks,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Chris&lt;br&gt;
&lt;br&gt;
Chris, on my machine using MATLAB R2007B the Interpolated.eps looks fine, with no interpolation at all, so I'm stumped. I would take a screenshot of your eps file and send it to technical support, along with the code.&lt;br&gt;
&lt;br&gt;
Sorry I couldn't help more.&lt;br&gt;
Oliver</description>
    </item>
    <item>
      <pubDate>Tue, 16 Jun 2009 09:04:02 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657661</link>
      <author>Christopher Hummersone</author>
      <description>How strange!  I've tried it on two Intel MacBooks (one running R2008B on OS X 10.4 and the other running R2007A on OS  X 10.5) and they both do the same thing.  Thanks a lot for your time Oliver - much appreciated!</description>
    </item>
    <item>
      <pubDate>Tue, 16 Jun 2009 11:45:03 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#657704</link>
      <author>Oliver Woodford</author>
      <description>&quot;Christopher Hummersone&quot; &amp;lt;wheely_chairs@hotmail.com&amp;gt; wrote in message &amp;lt;h17n62$ls9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; How strange!  I've tried it on two Intel MacBooks (one running R2008B on OS X 10.4 and the other running R2007A on OS  X 10.5) and they both do the same thing.  Thanks a lot for your time Oliver - much appreciated!&lt;br&gt;
&lt;br&gt;
I should add I'm using Windows. Perhaps it's an OS thing.&lt;br&gt;
Oliver</description>
    </item>
    <item>
      <pubDate>Thu, 18 Jun 2009 10:41:01 -0400</pubDate>
      <title>Re: Binary images and EPS?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253642#658405</link>
      <author>Christopher Hummersone</author>
      <description>I thought I would just post my findings for future reference.  I was probably being a but dim but it turns out the interpolation is an artefact of OS X Preview - I also saw it in LaTeX through the TeXShop client because the preview is based on OS X Preview. I opened the file in Adobe Illustrator and converted to PDF and found there was no interpolation in Illustrator or Acrobat Reader.  Interestingly, when I print the page though TeXShop the interpolation is gone and looks as it does in Acrobat.  Another weird thing is that Matlab seems to invert the colours when exporting to EPS (although I didn't check any other formats), but only in the plot and the colour bar (i.e. not the text).&lt;br&gt;
&lt;br&gt;
Why are the simple things never straight forward :-)</description>
    </item>
  </channel>
</rss>

