<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : GIF transparency</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : GIF transparency]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 23:28:48 +0000</pubDate>
  <lastBuildDate>Sun, 14 Jan 2007 06:03:48 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=6107</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[GIF transparency : Thanks! I&amp;#039;ll give it a try....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6107&amp;PID=19297&amp;title=gif-transparency#19297</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 6107<br /><strong>Posted:</strong> 14 January 2007 at 6:03am<br /><br />Thanks! I'll give it a try.]]>
   </description>
   <pubDate>Sun, 14 Jan 2007 06:03:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6107&amp;PID=19297&amp;title=gif-transparency#19297</guid>
  </item> 
  <item>
   <title><![CDATA[GIF transparency : Hi, try OleLoadPicture:      #include...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6107&amp;PID=19291&amp;title=gif-transparency#19291</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6107<br /><strong>Posted:</strong> 14 January 2007 at 3:23am<br /><br />Hi,<DIV>try OleLoadPicture:</DIV><DIV>&nbsp;</DIV><DIV><TABLE =code width="98%"><T><TR><TD><PRE><SPAN =PREPROCESSOR>#include</SPAN> &lt;olectl.h&gt;        HRESULT Load(LPCTSTR szFile)    {        CComPtr&lt;IStream&gt; pStream;                <SPAN =COMMENT>// Load the file to a memory stream</SPAN>        HRESULT hr = FileToStream(szFile, &amp;pStream);        <SPAN =KEYWORD>if</SPAN> (SUCCEEDED(hr))        {            <SPAN =COMMENT>// Decode the picture</SPAN>            hr = ::OleLoadPicture(                    pStream,            <SPAN =COMMENT>// &#091;in&#093; Pointer to the stream that contains picture's data</SPAN>                    <SPAN =NUMBER>0</SPAN>,                    <SPAN =COMMENT>// &#091;in&#093; Number of bytes read from the stream (0 == entire)</SPAN>                    <SPAN =KEYWORD>true</SPAN>,                <SPAN =COMMENT>// &#091;in&#093; Loose original format if true</SPAN>                    IID_IPicture,        <SPAN =COMMENT>// &#091;in&#093; Requested interface</SPAN>                    (<SPAN =KEYWORD>void</SPAN>**)&amp;m_pPicture <SPAN =COMMENT>// &#091;out&#093; IPictire object on success</SPAN>                    );        }        <SPAN =KEYWORD>return</SPAN> hr;    }    HRESULT DrawImg(HDC hdc, <SPAN =KEYWORD>const</SPAN> RECT&amp; rcBounds)    {        <SPAN =KEYWORD>if</SPAN> (m_pPicture)        {            <SPAN =COMMENT>// Get the width and the height of the picture</SPAN>            <SPAN =KEYWORD>long</SPAN> hmWidth = <SPAN =NUMBER>0</SPAN>, hmHeight = <SPAN =NUMBER>0</SPAN>;            m_pPicture-&gt;get_Width(&amp;hmWidth);            m_pPicture-&gt;get_Height(&amp;hmHeight);            <SPAN =COMMENT>// Convert himetric to pixels</SPAN>            <SPAN =KEYWORD>int</SPAN> nWidth    = MulDiv(hmWidth, ::GetDeviceCaps(hdc, LOGPIXELSX), HIMETRIC_INCH);            <SPAN =KEYWORD>int</SPAN> nHeight    = MulDiv(hmHeight, ::GetDeviceCaps(hdc, LOGPIXELSY), HIMETRIC_INCH);            <SPAN =COMMENT>// Display the picture using IPicture::Render</SPAN>            <SPAN =KEYWORD>return</SPAN> m_pPicture-&gt;Render(                hdc,                            <SPAN =COMMENT>// &#091;in&#093; Handle of device context on which to render the image</SPAN>                rcBounds.left,                    <SPAN =COMMENT>// &#091;in&#093; Horizontal position of image in hdc</SPAN>                rcBounds.top,                    <SPAN =COMMENT>// &#091;in&#093; Vertical position of image in hdc</SPAN>                rcBounds.right - rcBounds.left,    <SPAN =COMMENT>// &#091;in&#093; Horizontal dimension of destination rectangle</SPAN>                rcBounds.bottom - rcBounds.top, <SPAN =COMMENT>// &#091;in&#093; Vertical dimension of destination rectangle</SPAN>                <SPAN =NUMBER>0</SPAN>,                                <SPAN =COMMENT>// &#091;in&#093; Horizontal offset in source picture</SPAN>                hmHeight,                        <SPAN =COMMENT>// &#091;in&#093; Vertical offset in source picture</SPAN>                hmWidth,                        <SPAN =COMMENT>// &#091;in&#093; Amount to copy horizontally in source picture</SPAN>                -hmHeight,                        <SPAN =COMMENT>// &#091;in&#093; Amount to copy vertically in source picture</SPAN>                &amp;rcBounds                        <SPAN =COMMENT>// &#091;in, optional&#093; Pointer to position of destination for a metafile hdc</SPAN>                );        }        <SPAN =KEYWORD>return</SPAN> E_UNEXPECTED;    }</PRE></TD></TR></T></TABLE></DIV>]]>
   </description>
   <pubDate>Sun, 14 Jan 2007 03:23:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6107&amp;PID=19291&amp;title=gif-transparency#19291</guid>
  </item> 
  <item>
   <title><![CDATA[GIF transparency : Xtreme Toolkit Pro has a lot of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6107&amp;PID=19284&amp;title=gif-transparency#19284</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 6107<br /><strong>Posted:</strong> 13 January 2007 at 6:58pm<br /><br />Xtreme Toolkit Pro has a lot of classes, so before I try to implement this sh*t myself, I'm going to ask&nbsp;the gurus :)<DIV>&nbsp;</DIV><DIV>GDI+/MFC gives us CImage - a quite handy class for image loading/saving. The problem is that it cannot draw a GIF correctly. The transparent parts are drawn&nbsp;in solid green.</DIV><DIV>&nbsp;</DIV><DIV>My question is; is there a class in the library that can help in this case? All I want to do is to load a GIF with transparency and then paint it correctly.</DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV>]]>
   </description>
   <pubDate>Sat, 13 Jan 2007 18:58:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6107&amp;PID=19284&amp;title=gif-transparency#19284</guid>
  </item> 
 </channel>
</rss>