<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>jpgalleg</title>
		<link>http://www.allegro.cc/forums/view/591566</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 29 May 2007 09:40:17 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I cannot understand how to install the Grabber plugin from jpgalleg. I cannot find any of the directories it speaks of (allegro/tools/plugins, jpgalleg/plugins, etc.) or anything. </p><p>I used devpaks to install both allegro and jgpalleg. I can only find jpgalleg.h and a .a file for jpgalleg. </p><p>What can I do?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (moon_rabbits)</author>
		<pubDate>Fri, 25 May 2007 07:42:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><s>Check out the examples folder in jpgalleg.zip</s></p><p>This post never happened. <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ceagon Xylas)</author>
		<pubDate>Fri, 25 May 2007 08:07:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s not that I don&#39;t know how to use it; I can&#39;t get it installed properly. </p><p>When compiled, I get multiple definition errors and whatnot, even though everything should be installed properly.</p><p>Also, I have no idea where these directories are that the install instructions refer too. I have no allegro/tool directory, or any of the other ones it mentions.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (moon_rabbits)</author>
		<pubDate>Fri, 25 May 2007 08:13:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;re using MinGW I assume.</p><p>You ran <tt>fix mingw32</tt>, <tt>make</tt>, and <tt>make install</tt>, correct? You did say you had the jpgalleg.h and jpgalleg.a files, so again, I assume so.</p><p>Have you tried to compile any of the examples?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ceagon Xylas)</author>
		<pubDate>Fri, 25 May 2007 08:19:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You ran fix mingw32, make, and make install, correct? You did say you had the jpgalleg.h and jpgalleg.a files, so again, I assume so.</p><p>Have you tried to compile any of the examples?
</p></div></div><p>

No, I didn&#39;t use mingw32 to install it. I have no idea how to install libraries like that, and have yet to find a tutorial that I&#39;ve been successful learning from. I use .devpaks to install libraries. I used the Package Manager in DevCpp to install both Allegro and JPGalleg.</p><p>I get the same errors compiling the examples.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (moon_rabbits)</author>
		<pubDate>Fri, 25 May 2007 08:25:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The dev-pack must not have a copy of the grabber with the jpg stuff linked in. I followed the compile instructions for jpgalleg and the grabber plugin, and it worked fine.</p><p>The following link is a copy of grabber.exe and dat.exe with the plugin compiled in. Once you get used to building things from scratch, it becomes second nature.</p><p><a href="http://www.timorg.net/jpg_dat_tools.zip">http://www.timorg.net/jpg_dat_tools.zip</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Timorg)</author>
		<pubDate>Fri, 25 May 2007 08:44:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It crashes every time I Grab a JPG file. I&#39;m running in Vista, btw.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (moon_rabbits)</author>
		<pubDate>Sat, 26 May 2007 20:27:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I tested it when I built it, and it worked, so I downloaded the one I uploaded, and it crashes. I went back to the ones I built, and they crash too now. I guess it might  be a problem with the allegro dll being different to the one I built against. I will look into it.</p><p>Edit: I really don&#39;t know what is going on, I have rebuilt allegro, rebuilt jpgalleg (2.5 and 2.3) in various combinations, and it still doesn&#39;t work. I guess I must have imagined it working, cause it doesnt work now.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Timorg)</author>
		<pubDate>Sat, 26 May 2007 21:02:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Some time ago there was a similar thread about crashing when loading jpg-images. <br />I had this problem too with Allegro 4.2.0.<br />Then I tried jpgalleg version 2.5 with Allegro 4.0.3 and it worked with this grabber file! <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> </p><p>Maybe this can help...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (longear)</author>
		<pubDate>Sat, 26 May 2007 23:04:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>longear: thanks for the advice, jpgalleg 2.5 grabber plugin does work with allegro-4.0.3 <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>I built allegro 4.0.3, I then built jpgalleg 2.5, then I built the grabber plugin, and made a copy of the grabber.exe and dat.exe. I then removed allegro 4.0.3, stuck on allegro 4.2.1 and built that, then built jpgalleg 2.5 against it.</p><p>I then built a simple test program that checked if data files created with the 4.0.3 grabber could be used by the 4.2.1 dll. The test worked fine, I hope that it doesn&#39;t have any problems.</p><p><a href="http://www.timorg.net/jpgalleg.zip">http://www.timorg.net/jpgalleg.zip</a></p><p>This zip contains the grabber.exe, dat.exe, allegro-4.0.3 dll, a compiled jpgalleg 2.5 (against allegro 4.2.1), allegro 4.2.1 dll and an example program.</p><p>the example needs to be linked against &#39;-lalleg&#39; and &#39;-ljpgal&#39;</p><p>In jpgalleg, you need to copy the include directory to the mingw include directory and the lib\mingw32 to the mingw lib directory.</p><p>If you arnt using 4.2.1, you probably will need to recompile jpgalleg against whatever version you are using.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Timorg)</author>
		<pubDate>Sun, 27 May 2007 00:14:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Be careful with the 4.0.x branch and datafiles.  There was a longstanding bug with file decompression.  As I recall, on certain bitstreams it saved the data correctly, but then would refuse to load it (using a 4.2.1 version of grabber should load it though).  Anyway, make backups.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Sun, 27 May 2007 05:27:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The grabber works fine now, but any program I compile (including the test) crashes no matter what I do. </p><p>I try not using datafiles and just loading jpgs, I tried running wxDevcpp as admin, etc. etc. but it still always crashes.</p><p>If I include jpgalleg.h, it works fine, if I use jpgalleg_init(); it works fine, but as soon as I do anything that uses a .jpg file (like loading one) it crashes. </p><p>I&#39;m using Allegro2.4.1, jpgalleg2.5, Windows Vista, and wxDevCpp. Any suggestions?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (moon_rabbits)</author>
		<pubDate>Tue, 29 May 2007 01:24:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just tested the contents of the zip file, it seems to be working fine. I have put the example I used to test the code in <a href="http://www.timorg.net/load_jpeg.zip">here</a></p><p>You need to add the path &#39;.&#39; to the library directories, so that the compiler can find the local copy of libjpgal.a </p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">2</td><td><span class="p">#include "include/jpgalleg.h"</span></td></tr><tr><td class="number">3</td><td>&#160;</td></tr><tr><td class="number">4</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">5</td><td><span class="k2">{</span></td></tr><tr><td class="number">6</td><td>  <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">7</td><td>  <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">8</td><td>&#160;</td></tr><tr><td class="number">9</td><td>  jpgalleg_init<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">10</td><td>&#160;</td></tr><tr><td class="number">11</td><td>  <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">32</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">12</td><td>  <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>fluffy <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">"fluffy.jpg"</span>, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>  <span class="k1">if</span> <span class="k2">(</span>fluffy <span class="k3">=</span><span class="k3">=</span> NULL<span class="k2">)</span></td></tr><tr><td class="number">15</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">16</td><td>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"unable to load file. :("</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">17</td><td>    <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">19</td><td>&#160;</td></tr><tr><td class="number">20</td><td>  <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>fluffy, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, fluffy-&gt;w, fluffy-&gt;h<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">21</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>fluffy<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">22</td><td>  <a href="http://www.allegro.cc/manual/readkey" target="_blank"><span class="a">readkey</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">23</td><td>&#160;</td></tr><tr><td class="number">24</td><td>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">25</td><td><span class="k2">}</span></td></tr><tr><td class="number">26</td><td><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span></td></tr></tbody></table></div></div><p>


A last thought, are you checking the return value of load_bitmap()?, if might be failing because it couldn&#39;t load an image, and when you blit, it crashes. Rather than crashing on load.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Timorg)</author>
		<pubDate>Tue, 29 May 2007 09:40:17 +0000</pubDate>
	</item>
</rss>
