<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Albertux# ./Blog &#187; mingw</title>
	<atom:link href="http://albertux.ayalasoft.net/tag/mingw/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertux.ayalasoft.net</link>
	<description>Welcome to the new decade: Java is a restricted platform, Google is evil, Apple is a monopoly and Microsoft are the underdogs</description>
	<lastBuildDate>Sat, 04 Sep 2010 00:38:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Use CImg on MinGw</title>
		<link>http://albertux.ayalasoft.net/2009/04/06/use-cimg-mingw/</link>
		<comments>http://albertux.ayalasoft.net/2009/04/06/use-cimg-mingw/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 23:18:23 +0000</pubDate>
		<dc:creator>Albertux</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[c/c++]]></category>
		<category><![CDATA[lib]]></category>
		<category><![CDATA[mingw]]></category>

		<guid isPermaLink="false">http://albertux.ayalasoft.net/?p=1864</guid>
		<description><![CDATA[Use CImg on MinGw Needs MinGW Downlaod CImg This example code is taken from: Fatchoco Blog test.cpp: #include &#34;CImg.h&#34; &#160; using namespace cimg_library; &#160; int main&#40;int argc, char *argv&#91;&#93;&#41; &#123; CImg&#60;unsigned char&#62; img&#40;640,400,1,3&#41;; // Define a 640x400 color image with 8 bits per color component. img.fill&#40;0&#41;; // Set pixel values to 0 (color : black) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Use CImg on MinGw</strong></p>
<p>Needs <a href="http://www.mingw.org/" target="_blank">MinGW</a><br />
Downlaod <a href="http://cimg.sourceforge.net/" target="_blank">CImg</a><br />
This example code is taken from: <a href="http://fatchoco.wordpress.com/2009/03/01/using-cimg-in-mingw/" target="_blank">Fatchoco Blog</a></p>
<p>test.cpp:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #339900;">#include &quot;CImg.h&quot;</span>
&nbsp;
<span style="color: #0000ff;">using</span> <span style="color: #0000ff;">namespace</span> cimg_library<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>argv<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
    CImg<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">char</span><span style="color: #000080;">&gt;</span> img<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">640</span>,<span style="color: #0000dd;">400</span>,<span style="color: #0000dd;">1</span>,<span style="color: #0000dd;">3</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>            <span style="color: #666666;">// Define a 640x400 color image with 8 bits per color component.</span>
    img.<span style="color: #007788;">fill</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>                                       <span style="color: #666666;">// Set pixel values to 0 (color : black)</span>
    <span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">char</span> purple<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#123;</span> <span style="color: #0000dd;">255</span>,<span style="color: #0000dd;">0</span>,<span style="color: #0000dd;">255</span> <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>         <span style="color: #666666;">// Define a purple color</span>
    img.<span style="color: #007788;">draw_text</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">100</span>,<span style="color: #0000dd;">100</span>,<span style="color: #FF0000;">&quot;Hello World&quot;</span>,purple,<span style="color: #0000dd;">0</span>,<span style="color: #0000dd;">1</span>,<span style="color: #0000dd;">35</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// Draw a purple &quot;Hello world&quot; at coordinates (100,100).</span>
    img.<span style="color: #007788;">display</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;My first CImg code&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>               <span style="color: #666666;">// Display the image in a display window.</span>
    <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>Put CImg.h in the same dir as test.cpp and compile:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">g++</span>  test.cpp  <span style="color: #660033;">-c</span>  <span style="color: #660033;">-o</span>  test.o
<span style="color: #c20cb9; font-weight: bold;">g++</span>  test.o  <span style="color: #660033;">-lgdi32</span>  <span style="color: #660033;">-o</span>  test.exe</pre></div></div>

<p><a href="http://albertux.ayalasoft.net/img/cimg-mingw.jpg" rel="shadowbox"><img src="http://albertux.ayalasoft.net/img/cimg-mingw-thumb.jpg"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://albertux.ayalasoft.net/2009/04/06/use-cimg-mingw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
