<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bitmap loader]]></title><description><![CDATA[<p>Ich schriebe gerade eine Bmp Loader für ein Spiel.</p>
<p>Quellcode:</p>
<p>Headerdatei:</p>
<pre><code class="language-cpp">//////////////////////////////////////////////////////////////////////////
#include &lt;cstdio&gt;
#include &lt;cassert&gt;

//////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
// Speicherleichen vermeiden, TIFE KOPIEN!!!!
// eventuell Imgae class erstellen
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////

#pragma  pack(1)
struct ZpBMPFileHeader
{
	char			m_cType[2];		// 2 bytes
	unsigned int	m_wFileSize;	// 4 bytes
	short int		m_nReserved1;	// 2 bytes
	short int		m_nReserved2;	// 2 bytes
	unsigned int	m_wOffsetBits;	// 4 bytes;
};
#pragma pack()

#pragma  pack(1)
struct ZpBMPInfoHeader
{
	unsigned int	m_wSizeOfHeader;	// 4 bytes - 40
	unsigned int	m_wWidth;			// 4 bytes
	unsigned int	m_wHeight;			// 4 bytes
	short int		m_nPlanes;			// 2 bytes
	short int		m_nBitCount;		// 2 bytes
	unsigned int	m_wCompression;		// 4 bytes
	unsigned int	m_wSizeOfImage;		// 4 bytes
	unsigned int	m_wXPelsPerMeter;	// 4 bytes
	unsigned int	m_wYPelsPerMeter;	// 4 bytes
	unsigned int	m_wColorUsed;		// 4 bytes;
	unsigned int	m_wColorImportant;	// 4 bytes
};
#pragma pack()

struct ZpImage
{
	unsigned int	m_wWidth;
	unsigned int	m_wHeight;
	unsigned int*	m_pARGB;
};

class ZpBmpLoader
{
private:
	ZpBMPFileHeader	m_BmpFileHeader;
	ZpBMPInfoHeader	m_BmpInfoHeader;
	ZpImage			m_Image;

public:
	ZpBmpLoader(void);
	ZpBmpLoader(const ZpBmpLoader	*Bitmap);
	ZpBmpLoader(const char			*pFileName);

	~ZpBmpLoader(void);

	bool LoadBmpFile(const char *pFileName);
	void Release(void);

	void print(void)
	{
		printf(&quot;%x\n&quot;, m_Image.m_pARGB);
		printf(&quot;%d\n&quot;, m_Image.m_wWidth);
	}

	ZpBmpLoader &amp;operator=(const ZpBmpLoader	*Bitmap);
};
</code></pre>
<p>Quellcodedatei:</p>
<pre><code class="language-cpp">//////////////////////////////////////////////////////////////////////////
#include &quot;ZpBmpLoader.h&quot;

//////////////////////////////////////////////////////////////////////////
ZpBmpLoader::ZpBmpLoader(void)
{
}

ZpBmpLoader::ZpBmpLoader(const ZpBmpLoader *Bitmap)
{
	m_Image.m_wWidth	= Bitmap-&gt;m_Image.m_wWidth;
	m_Image.m_wHeight	= Bitmap-&gt;m_Image.m_wHeight;
	m_Image.m_pARGB		= new(unsigned int[m_Image.m_wWidth * m_Image.m_wHeight]);

	//*m_Image.m_pARGB = *Bitmap-&gt;m_Image.m_pARGB;
	// oder

	for(unsigned int h = 0; h &lt; m_Image.m_wHeight; h ++)
	{
		for(unsigned int w = 0; w &lt; m_Image.m_wWidth; w ++)
		{
			m_Image.m_pARGB[w + h * m_Image.m_wWidth] = Bitmap-&gt;m_Image.m_pARGB[w + h * Bitmap-&gt;m_Image.m_wWidth];
		}
	}

	m_BmpFileHeader = Bitmap-&gt;m_BmpFileHeader;
	m_BmpInfoHeader = Bitmap-&gt;m_BmpInfoHeader;
}

ZpBmpLoader::ZpBmpLoader(const char *pFileName)
{
	LoadBmpFile(pFileName);
}

ZpBmpLoader::~ZpBmpLoader(void)
{
	Release();
}

bool ZpBmpLoader::LoadBmpFile(const char *pFileName)
{
	FILE* pFile = fopen(pFileName, &quot;rb&quot;);

	if(!pFile)
		return(false);

	fread(&amp;m_BmpFileHeader, 1, sizeof(ZpBMPFileHeader), pFile);

	if((m_BmpFileHeader.m_cType[0] != 'B') &amp;&amp; (m_BmpFileHeader.m_cType[1] != 'M'))
		return(false);

	fread(&amp;m_BmpInfoHeader, 1, sizeof(ZpBMPInfoHeader), pFile);

	m_Image.m_wWidth  = m_BmpInfoHeader.m_wWidth;
	m_Image.m_wHeight = m_BmpInfoHeader.m_wHeight;

	fseek(pFile, m_BmpFileHeader.m_wOffsetBits, SEEK_SET);

	m_Image.m_pARGB = new(unsigned int[m_Image.m_wWidth * m_Image.m_wHeight]);
	assert(!(m_Image.m_pARGB == NULL) &amp;&amp; &quot;Error allocating memory for image&quot;);

	int iNumPaddedBytes = (m_Image.m_wWidth * 3) % 4;

	unsigned char r, g, b;
	unsigned char skip[4];

	for(unsigned int h = 0; h &lt; m_Image.m_wHeight; h ++)
	{
		for(unsigned int w = 0; w &lt; m_Image.m_wWidth; w ++)
		{
			fread(&amp;b, 1, 1, pFile);
			fread(&amp;g, 1, 1, pFile);
			fread(&amp;r, 1, 1, pFile);

			m_Image.m_pARGB[w + h * m_Image.m_wWidth] = (r &lt;&lt; 16 | g &lt;&lt; 8 | b);
		}

		if(iNumPaddedBytes != 0)
		{
			fread(skip, 1, 4 - iNumPaddedBytes, pFile);
		}
	}

	fclose(pFile);
	return(true);
}

void ZpBmpLoader::Release(void)
{
	if(m_Image.m_pARGB != NULL)
		delete[](m_Image.m_pARGB);
	printf(&quot;release&quot;);
}

ZpBmpLoader &amp;ZpBmpLoader::operator=(const ZpBmpLoader *Bitmap)
{
	if(this == Bitmap)
		return(*this);
	if(m_Image.m_pARGB)
		Release();
	m_Image.m_wWidth	= Bitmap-&gt;m_Image.m_wWidth;
	m_Image.m_wHeight	= Bitmap-&gt;m_Image.m_wHeight;
	m_Image.m_pARGB		= new(unsigned int[m_Image.m_wWidth * m_Image.m_wHeight]);

	//*m_Image.m_pARGB = *Bitmap-&gt;m_Image.m_pARGB;
	// oder

	for(unsigned int h = 0; h &lt; m_Image.m_wHeight; h ++)
	{
		for(unsigned int w = 0; w &lt; m_Image.m_wWidth; w ++)
		{
			m_Image.m_pARGB[w + h * m_Image.m_wWidth] = Bitmap-&gt;m_Image.m_pARGB[w + h * Bitmap-&gt;m_Image.m_wWidth];
		}
	}

	m_BmpFileHeader = Bitmap-&gt;m_BmpFileHeader;
	m_BmpInfoHeader = Bitmap-&gt;m_BmpInfoHeader;

	return(*this);
}
</code></pre>
<p>Der Bmp loader erzeugt leider nur Flache kopien, wenn ich ihm eine andere Instanz<br />
übergebe, Warum???</p>
<p>Mein zweites Problem ist die Speicherverwaltung: Wenn ich eine Image löschen will, die gelöscht ist, gibt es einen Fehler und es kommt zum Absturz. Warum reichen folgende Zeilen zur Abfrage nicht aus?</p>
<pre><code class="language-cpp">void ZpBmpLoader::Release(void)
{
	if(m_Image.m_pARGB != NULL)
		delete[](m_Image.m_pARGB);
	printf(&quot;release&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/124808/bitmap-loader</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 02:27:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124808.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 Oct 2005 16:40:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 16:40:38 GMT]]></title><description><![CDATA[<p>Ich schriebe gerade eine Bmp Loader für ein Spiel.</p>
<p>Quellcode:</p>
<p>Headerdatei:</p>
<pre><code class="language-cpp">//////////////////////////////////////////////////////////////////////////
#include &lt;cstdio&gt;
#include &lt;cassert&gt;

//////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
// Speicherleichen vermeiden, TIFE KOPIEN!!!!
// eventuell Imgae class erstellen
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////

#pragma  pack(1)
struct ZpBMPFileHeader
{
	char			m_cType[2];		// 2 bytes
	unsigned int	m_wFileSize;	// 4 bytes
	short int		m_nReserved1;	// 2 bytes
	short int		m_nReserved2;	// 2 bytes
	unsigned int	m_wOffsetBits;	// 4 bytes;
};
#pragma pack()

#pragma  pack(1)
struct ZpBMPInfoHeader
{
	unsigned int	m_wSizeOfHeader;	// 4 bytes - 40
	unsigned int	m_wWidth;			// 4 bytes
	unsigned int	m_wHeight;			// 4 bytes
	short int		m_nPlanes;			// 2 bytes
	short int		m_nBitCount;		// 2 bytes
	unsigned int	m_wCompression;		// 4 bytes
	unsigned int	m_wSizeOfImage;		// 4 bytes
	unsigned int	m_wXPelsPerMeter;	// 4 bytes
	unsigned int	m_wYPelsPerMeter;	// 4 bytes
	unsigned int	m_wColorUsed;		// 4 bytes;
	unsigned int	m_wColorImportant;	// 4 bytes
};
#pragma pack()

struct ZpImage
{
	unsigned int	m_wWidth;
	unsigned int	m_wHeight;
	unsigned int*	m_pARGB;
};

class ZpBmpLoader
{
private:
	ZpBMPFileHeader	m_BmpFileHeader;
	ZpBMPInfoHeader	m_BmpInfoHeader;
	ZpImage			m_Image;

public:
	ZpBmpLoader(void);
	ZpBmpLoader(const ZpBmpLoader	*Bitmap);
	ZpBmpLoader(const char			*pFileName);

	~ZpBmpLoader(void);

	bool LoadBmpFile(const char *pFileName);
	void Release(void);

	void print(void)
	{
		printf(&quot;%x\n&quot;, m_Image.m_pARGB);
		printf(&quot;%d\n&quot;, m_Image.m_wWidth);
	}

	ZpBmpLoader &amp;operator=(const ZpBmpLoader	*Bitmap);
};
</code></pre>
<p>Quellcodedatei:</p>
<pre><code class="language-cpp">//////////////////////////////////////////////////////////////////////////
#include &quot;ZpBmpLoader.h&quot;

//////////////////////////////////////////////////////////////////////////
ZpBmpLoader::ZpBmpLoader(void)
{
}

ZpBmpLoader::ZpBmpLoader(const ZpBmpLoader *Bitmap)
{
	m_Image.m_wWidth	= Bitmap-&gt;m_Image.m_wWidth;
	m_Image.m_wHeight	= Bitmap-&gt;m_Image.m_wHeight;
	m_Image.m_pARGB		= new(unsigned int[m_Image.m_wWidth * m_Image.m_wHeight]);

	//*m_Image.m_pARGB = *Bitmap-&gt;m_Image.m_pARGB;
	// oder

	for(unsigned int h = 0; h &lt; m_Image.m_wHeight; h ++)
	{
		for(unsigned int w = 0; w &lt; m_Image.m_wWidth; w ++)
		{
			m_Image.m_pARGB[w + h * m_Image.m_wWidth] = Bitmap-&gt;m_Image.m_pARGB[w + h * Bitmap-&gt;m_Image.m_wWidth];
		}
	}

	m_BmpFileHeader = Bitmap-&gt;m_BmpFileHeader;
	m_BmpInfoHeader = Bitmap-&gt;m_BmpInfoHeader;
}

ZpBmpLoader::ZpBmpLoader(const char *pFileName)
{
	LoadBmpFile(pFileName);
}

ZpBmpLoader::~ZpBmpLoader(void)
{
	Release();
}

bool ZpBmpLoader::LoadBmpFile(const char *pFileName)
{
	FILE* pFile = fopen(pFileName, &quot;rb&quot;);

	if(!pFile)
		return(false);

	fread(&amp;m_BmpFileHeader, 1, sizeof(ZpBMPFileHeader), pFile);

	if((m_BmpFileHeader.m_cType[0] != 'B') &amp;&amp; (m_BmpFileHeader.m_cType[1] != 'M'))
		return(false);

	fread(&amp;m_BmpInfoHeader, 1, sizeof(ZpBMPInfoHeader), pFile);

	m_Image.m_wWidth  = m_BmpInfoHeader.m_wWidth;
	m_Image.m_wHeight = m_BmpInfoHeader.m_wHeight;

	fseek(pFile, m_BmpFileHeader.m_wOffsetBits, SEEK_SET);

	m_Image.m_pARGB = new(unsigned int[m_Image.m_wWidth * m_Image.m_wHeight]);
	assert(!(m_Image.m_pARGB == NULL) &amp;&amp; &quot;Error allocating memory for image&quot;);

	int iNumPaddedBytes = (m_Image.m_wWidth * 3) % 4;

	unsigned char r, g, b;
	unsigned char skip[4];

	for(unsigned int h = 0; h &lt; m_Image.m_wHeight; h ++)
	{
		for(unsigned int w = 0; w &lt; m_Image.m_wWidth; w ++)
		{
			fread(&amp;b, 1, 1, pFile);
			fread(&amp;g, 1, 1, pFile);
			fread(&amp;r, 1, 1, pFile);

			m_Image.m_pARGB[w + h * m_Image.m_wWidth] = (r &lt;&lt; 16 | g &lt;&lt; 8 | b);
		}

		if(iNumPaddedBytes != 0)
		{
			fread(skip, 1, 4 - iNumPaddedBytes, pFile);
		}
	}

	fclose(pFile);
	return(true);
}

void ZpBmpLoader::Release(void)
{
	if(m_Image.m_pARGB != NULL)
		delete[](m_Image.m_pARGB);
	printf(&quot;release&quot;);
}

ZpBmpLoader &amp;ZpBmpLoader::operator=(const ZpBmpLoader *Bitmap)
{
	if(this == Bitmap)
		return(*this);
	if(m_Image.m_pARGB)
		Release();
	m_Image.m_wWidth	= Bitmap-&gt;m_Image.m_wWidth;
	m_Image.m_wHeight	= Bitmap-&gt;m_Image.m_wHeight;
	m_Image.m_pARGB		= new(unsigned int[m_Image.m_wWidth * m_Image.m_wHeight]);

	//*m_Image.m_pARGB = *Bitmap-&gt;m_Image.m_pARGB;
	// oder

	for(unsigned int h = 0; h &lt; m_Image.m_wHeight; h ++)
	{
		for(unsigned int w = 0; w &lt; m_Image.m_wWidth; w ++)
		{
			m_Image.m_pARGB[w + h * m_Image.m_wWidth] = Bitmap-&gt;m_Image.m_pARGB[w + h * Bitmap-&gt;m_Image.m_wWidth];
		}
	}

	m_BmpFileHeader = Bitmap-&gt;m_BmpFileHeader;
	m_BmpInfoHeader = Bitmap-&gt;m_BmpInfoHeader;

	return(*this);
}
</code></pre>
<p>Der Bmp loader erzeugt leider nur Flache kopien, wenn ich ihm eine andere Instanz<br />
übergebe, Warum???</p>
<p>Mein zweites Problem ist die Speicherverwaltung: Wenn ich eine Image löschen will, die gelöscht ist, gibt es einen Fehler und es kommt zum Absturz. Warum reichen folgende Zeilen zur Abfrage nicht aus?</p>
<pre><code class="language-cpp">void ZpBmpLoader::Release(void)
{
	if(m_Image.m_pARGB != NULL)
		delete[](m_Image.m_pARGB);
	printf(&quot;release&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/904765</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904765</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 16:40:38 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:01:32 GMT]]></title><description><![CDATA[<p>wo ist der kopierkonstruktor?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904871</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904871</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:01:32 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:10:43 GMT]]></title><description><![CDATA[<p>Also der ZpBmpLoader class nen</p>
<pre><code class="language-cpp">ZpBmpLoader(const ZpBmpLoader *bmp)
</code></pre>
<p>verpassen.</p>
<p>Wie soll der nun genau aussehen? Ähnlich wie der '=' operator?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904873</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904873</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:10:43 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:09:26 GMT]]></title><description><![CDATA[<p>referenz auf ein objekt, kein zeiger.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904874</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904874</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:09:26 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:15:45 GMT]]></title><description><![CDATA[<p>Soll ich beim '=' operator auch lieber Referenzen verwenden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904881</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:15:45 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:21:42 GMT]]></title><description><![CDATA[<pre><code>class Foo
{
public:
Foo(const Foo&amp;);
Foo&amp; operator=(const Foo&amp;);
};
</code></pre>
<p>erscheint mir sinnvoll.<br />
referenz bietet sich der einfachheit der übergabe des objektes meiner meinung nach an. (sonst müsstest du ja immer die methode o.operator=( &amp;deinobjekt) aufrufen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904886</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:21:42 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:22:39 GMT]]></title><description><![CDATA[<p>Stimmt, dann muss man auch nicht mehr so viele Fehlerchecks in die Methoden implentieren.</p>
<p>Hast du noch ne Antwort auf das Release Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904889</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904889</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:22:39 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:37:47 GMT]]></title><description><![CDATA[<p>ich frage mich grad, wozu du den kopierkonstruktor eigentlich brauchst.<br />
ich seh nur instanzen in deiner klasse, keine verweise, und kein new im konstruktor..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904910</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904910</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:37:47 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:41:40 GMT]]></title><description><![CDATA[<p>Warum, es wird doch m_Imgage.ARGB erneuert.<br />
Soll ich die ganze Klasse erneuern???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904917</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904917</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:41:40 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:56:55 GMT]]></title><description><![CDATA[<p>ein kopierkonstruktor (und ein selbsthergestellter zuweisungsoperator) und ein definierter destruktor sind dann nötig, wenn die klasse wirklich ein tiefe kopie braucht. das ist dann der fall, wenn das objekt über zeiger im konstruktor mit new ein objekt auf dem heap alloziert. da ein objekt für sich sorgen soll, muss es selber auch üblicherweise im destruktor dieses alloziierte stück wieder freigeben.</p>
<p>wenn du eine kopie erstellst, besteht bei der flachen kopie in diesem von mir beschriebenen obigen fall dann das problem, dass der zeiger auf das im konstruktor allozierte objekt kopiert wird, und damit zwei zeiger auf dasselbe objekt bestehen.<br />
beim aufruf eines destruktors wird dann das objekt gelöscht, der zweite destruktoraufruf der kopie (zum beispiel) läßt das programm abstürzen, da nichts mehr auf dem heap reserviert ist.<br />
es ist wie siamesische zwillinge mit einem herzen.</p>
<p>du musst in diesem fall, also wenn eine klasse über einen zeiger extra nochmal alloziert, für eine tiefe kopie sorgen.</p>
<p>wenn du in einer methode (nicht konstruktor) allozierst, und den zeiger nicht irgendwie weitergibst, erzeugst du speicherlöcher.</p>
<p><a href="http://fara.cs.uni-potsdam.de/~kaufmann/?page=GenCppFaqs&amp;faq=BigThree#Answ" rel="nofollow">http://fara.cs.uni-potsdam.de/~kaufmann/?page=GenCppFaqs&amp;faq=BigThree#Answ</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/904930</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904930</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:56:55 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 18:59:30 GMT]]></title><description><![CDATA[<p>Ja, dass ist schon klar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904937</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 18:59:30 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 19:04:52 GMT]]></title><description><![CDATA[<p>sorry, hab dein programm noch nicht ganz durchstiegen.<br />
der vortrag war voreilig <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/904939</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904939</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:04:52 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 19:09:28 GMT]]></title><description><![CDATA[<p>Sind auch ne ganze menge Zeilen, auf jeden Fall will ich ne Image class erstellen (statt Membervariable), sodass ich auch TGAs, Gifs und Jpgs laden kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904946</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:09:28 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 19:14:50 GMT]]></title><description><![CDATA[<p>mach erstmal das</p>
<pre><code>ZpBmpLoader::ZpBmpLoader(void)
{
	m_Image.m_pARGB=NULL;
}
</code></pre>
<p>dein m_Image ist einfach nicht angesprungen.</p>
<p>aber mir ist das alles zu gefährlich, soll man ein könner draufschaun <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/904951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904951</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:14:50 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 19:18:10 GMT]]></title><description><![CDATA[<p>Wozu soll das gut sein???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904953</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904953</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:18:10 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 19:23:10 GMT]]></title><description><![CDATA[<p>alleine bei falscheingabe einer datei stürzt dein programm sonst schon ab, bei aufruf von release..</p>
<pre><code>bool ZpBmpLoader::LoadBmpFile(const char *pFileName)
{
    FILE* pFile = fopen(pFileName, &quot;rb&quot;);

    if(!pFile)
        return(false);
</code></pre>
<p>du fragst ja in release ab auf</p>
<pre><code>if(m_Image.m_pARGB != NULL)
</code></pre>
<p>aber wo wird der zeiger m_pARGB genullt? überseh ich das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904958</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904958</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:23:10 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 19:25:19 GMT]]></title><description><![CDATA[<p>Stimmt, soloche Sachen übersieht man schnell!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904961</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904961</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:25:19 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap loader on Mon, 31 Oct 2005 19:25:48 GMT]]></title><description><![CDATA[<p>und ebenso hier..</p>
<pre><code>if((m_BmpFileHeader.m_cType[0] != 'B') &amp;&amp; (m_BmpFileHeader.m_cType[1] != 'M'))
        return(false);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/904963</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904963</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:25:48 GMT</pubDate></item></channel></rss>