<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>how to resize a bitmap image</title>
		<link>http://www.allegro.cc/forums/view/588454</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 09 Nov 2006 12:13:53 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have loaded a image(gif, jpg,..) of Dimension 800*600 into a bitmap. I want to resize the image into the dimension 500*400. </p><p>Thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (raja peter)</author>
		<pubDate>Wed, 08 Nov 2006 17:10:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><a href="http://www.allegro.cc/manual/stretch_blit" target="_blank"><span class="a">stretch_blit</span></a> <span class="k1">and</span> <a href="http://www.allegro.cc/manual/stretch_sprite" target="_blank"><span class="a">stretch_sprite</span></a> ?</span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Frank Drebin)</author>
		<pubDate>Wed, 08 Nov 2006 17:18:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>to resize it you must create a new bitmap of the appropriate size:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>a,<span class="k3">*</span>b<span class="k2">;</span>
a <span class="k3">=</span> <a href="http://www.allegro.cc/manual/load_bitmap" target="_blank"><span class="a">load_bitmap</span></a><span class="k2">(</span><span class="s">"jj.bmp"</span>,NULL<span class="k2">)</span><span class="k2">;</span>
b <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><span class="n">500</span>,<span class="n">400</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/stretch_blit" target="_blank"><span class="a">stretch_blit</span></a><span class="k2">(</span>a, b, <span class="n">0</span>, <span class="n">0</span>, a-&gt;w, a-&gt;h, <span class="n">0</span>, <span class="n">0</span>, b-&gt;w, dest_b-&gt;h<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>a<span class="k2">)</span><span class="k2">;</span> <span class="c">//free the memory, you can use b from now on</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (FMC)</author>
		<pubDate>Wed, 08 Nov 2006 17:24:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think these functions will display the resized image on the destination image.</p><p>Will it store it in the destination image.</p><p>I want to make it clear.</p><p>      I have a bitmap of size 800* 600 and want the same image reduced to 500*400. Then I&#39;ll use the resulted image further more.</p><p>Thanks FMC U cleared it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (raja peter)</author>
		<pubDate>Wed, 08 Nov 2006 17:25:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>FMC&#39;s suggestion will <i>store it in the destination image</i>.  It creates a new image, stretches your current image and saves that result in the 500x400 bitmap, so you have your full-sized image and your new smaller image in two separate memory locations.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeamTerradactyl)</author>
		<pubDate>Wed, 08 Nov 2006 23:40:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Display and store, in this case, mean the same thing.  You cannot display an image without storing it.  Even blitting to the screen results in the bitmap being stored in the primary video bitmap.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Erkle)</author>
		<pubDate>Thu, 09 Nov 2006 03:42:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How baddly does stretching distort the bitmap?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (julian boolean)</author>
		<pubDate>Thu, 09 Nov 2006 06:53:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks one and all.</p><p>I could make a fine stretching.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (raja peter)</author>
		<pubDate>Thu, 09 Nov 2006 12:13:53 +0000</pubDate>
	</item>
</rss>
