<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254135</link>
    <title>MATLAB Central Newsreader - Interesting problem with image alpha data</title>
    <description>Feed for thread: Interesting problem with image alpha data</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>Fri, 19 Jun 2009 08:44:02 -0400</pubDate>
      <title>Interesting problem with image alpha data</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254135#658693</link>
      <author>Michael </author>
      <description>&amp;nbsp;I have come across an interesting problem with setting the alpha data for an image, which I can't quite get my head around.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;To explain, consider the following example:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;h1 = figure(1);&lt;br&gt;
&amp;nbsp;h1a = axes('DataAspectRatio', [1 1 1], 'DrawMode', 'fast', 'Parent', h1);&lt;br&gt;
&amp;nbsp;h1b = image('Parent', h1a);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;All works as expect, then:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;set(h1b, 'CData', imread('Peppers.png'));  % load a test image.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;This works just as would be expected.  So, I then try:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;set(h1b, 'AlphaData', 0.75);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;Which has the right effect.  However, this image isn't positioned very nicely within the axes, so I use:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;set(h1a, 'XLim', [1 512], 'YLim', [1 384], 'YDir', 'reverse');&lt;br&gt;
&lt;br&gt;
&amp;nbsp;Which makes everything look nice.  But now if I set the alpha data to anything other than 1, the image just dissappears completely.  Can anyone tell me what is going wrong here?&lt;br&gt;
&lt;br&gt;
&amp;nbsp;I'm using Matlab R2009a with version 6.3 of the Image Processing toolbox.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;Many thanks!</description>
    </item>
    <item>
      <pubDate>Tue, 22 Sep 2009 03:05:13 -0400</pubDate>
      <title>Re: Interesting problem with image alpha data</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254135#681740</link>
      <author>Bill Winter</author>
      <description>&quot;Michael &quot; &amp;lt;michael.bennett@lineone.net&amp;gt; wrote in message &amp;lt;h1fj4i$7ln$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;  I have come across an interesting problem with setting the alpha data for an image, which I can't quite get my head around.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  To explain, consider the following example:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  h1 = figure(1);&lt;br&gt;
&amp;gt;  h1a = axes('DataAspectRatio', [1 1 1], 'DrawMode', 'fast', 'Parent', h1);&lt;br&gt;
&amp;gt;  h1b = image('Parent', h1a);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  All works as expect, then:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1b, 'CData', imread('Peppers.png'));  % load a test image.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  This works just as would be expected.  So, I then try:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1b, 'AlphaData', 0.75);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Which has the right effect.  However, this image isn't positioned very nicely within the axes, so I use:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1a, 'XLim', [1 512], 'YLim', [1 384], 'YDir', 'reverse');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Which makes everything look nice.  But now if I set the alpha data to anything other than 1, the image just dissappears completely.  Can anyone tell me what is going wrong here?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  I'm using Matlab R2009a with version 6.3 of the Image Processing toolbox.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Many thanks!&lt;br&gt;
&lt;br&gt;
Has anyone else seen this problem?  More importantly, has anyone identified a viable solution?</description>
    </item>
    <item>
      <pubDate>Tue, 22 Sep 2009 11:49:30 -0400</pubDate>
      <title>Re: Interesting problem with image alpha data</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254135#681808</link>
      <author>Loren Shure</author>
      <description>In article &amp;lt;h99et9$5as$1@fred.mathworks.com&amp;gt;, &lt;br&gt;
whichpart.wwinter.isnotanemail@uci.edu says...&lt;br&gt;
&amp;gt; &quot;Michael &quot; &amp;lt;michael.bennett@lineone.net&amp;gt; wrote in message &amp;lt;h1fj4i$7ln$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;  I have come across an interesting problem with setting the alpha data for an image, which I can't quite get my head around.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  To explain, consider the following example:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  h1 = figure(1);&lt;br&gt;
&amp;gt; &amp;gt;  h1a = axes('DataAspectRatio', [1 1 1], 'DrawMode', 'fast', 'Parent', h1);&lt;br&gt;
&amp;gt; &amp;gt;  h1b = image('Parent', h1a);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  All works as expect, then:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  set(h1b, 'CData', imread('Peppers.png'));  % load a test image.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  This works just as would be expected.  So, I then try:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  set(h1b, 'AlphaData', 0.75);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  Which has the right effect.  However, this image isn't positioned very nicely within the axes, so I use:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  set(h1a, 'XLim', [1 512], 'YLim', [1 384], 'YDir', 'reverse');&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  Which makes everything look nice.  But now if I set the alpha data to anything other than 1, the image just dissappears completely.  Can anyone tell me what is going wrong here?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  I'm using Matlab R2009a with version 6.3 of the Image Processing toolbox.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;  Many thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Has anyone else seen this problem?  More importantly, has anyone identified a viable solution?&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
It works for me in both R2009a and R2009b.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Loren&lt;br&gt;
&lt;a href=&quot;http://blogs.mathworks.com/loren&quot;&gt;http://blogs.mathworks.com/loren&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Tue, 18 May 2010 17:01:24 -0400</pubDate>
      <title>Re: Interesting problem with image alpha data</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254135#746484</link>
      <author>Carlos </author>
      <description>&quot;Michael &quot; &amp;lt;michael.bennett@lineone.net&amp;gt; wrote in message &amp;lt;h1fj4i$7ln$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;  I have come across an interesting problem with setting the alpha data for an image, which I can't quite get my head around.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  To explain, consider the following example:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  h1 = figure(1);&lt;br&gt;
&amp;gt;  h1a = axes('DataAspectRatio', [1 1 1], 'DrawMode', 'fast', 'Parent', h1);&lt;br&gt;
&amp;gt;  h1b = image('Parent', h1a);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  All works as expect, then:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1b, 'CData', imread('Peppers.png'));  % load a test image.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  This works just as would be expected.  So, I then try:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1b, 'AlphaData', 0.75);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Which has the right effect.  However, this image isn't positioned very nicely within the axes, so I use:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1a, 'XLim', [1 512], 'YLim', [1 384], 'YDir', 'reverse');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Which makes everything look nice.  But now if I set the alpha data to anything other than 1, the image just dissappears completely.  Can anyone tell me what is going wrong here?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  I'm using Matlab R2009a with version 6.3 of the Image Processing toolbox.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Many thanks!&lt;br&gt;
&lt;br&gt;
I had a very similar problem and it turned out to be a bug with OpenGL. I tried it on another computer and it just worked! Right now I am trying to update my OpenGL driver.</description>
    </item>
    <item>
      <pubDate>Wed, 02 Jun 2010 14:40:08 -0400</pubDate>
      <title>Re: Interesting problem with image alpha data</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254135#751008</link>
      <author>Rene v B</author>
      <description>Worked out for me:&lt;br&gt;
rotate the picture a little bit...&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Michael &quot; &amp;lt;michael.bennett@lineone.net&amp;gt; wrote in message &amp;lt;h1fj4i$7ln$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;  I have come across an interesting problem with setting the alpha data for an image, which I can't quite get my head around.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  To explain, consider the following example:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  h1 = figure(1);&lt;br&gt;
&amp;gt;  h1a = axes('DataAspectRatio', [1 1 1], 'DrawMode', 'fast', 'Parent', h1);&lt;br&gt;
&amp;gt;  h1b = image('Parent', h1a);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  All works as expect, then:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1b, 'CData', imread('Peppers.png'));  % load a test image.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  This works just as would be expected.  So, I then try:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1b, 'AlphaData', 0.75);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Which has the right effect.  However, this image isn't positioned very nicely within the axes, so I use:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  set(h1a, 'XLim', [1 512], 'YLim', [1 384], 'YDir', 'reverse');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Which makes everything look nice.  But now if I set the alpha data to anything other than 1, the image just dissappears completely.  Can anyone tell me what is going wrong here?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  I'm using Matlab R2009a with version 6.3 of the Image Processing toolbox.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  Many thanks!</description>
    </item>
  </channel>
</rss>

