<?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[TJPGImage-&amp;gt;Savetostream(stringstream)]]></title><description><![CDATA[<p>ich habe folgendes problem: ich will ein jpg als text in einen string kopieren.<br />
das jpg mit der methode SaveToFile geht ohne probleme,savetostream theoretisch auch,laut TStringStream-&gt;Size sind da irgendwas mit 110k zeichen,was auch stimmen sollte,allerdings wenn ich dann den text mit TStringStream-&gt;DataString<br />
in einen string oder in ein Memo übertragen will enthalten diese immer nur 4 zeichen</p>
<p>TJPEGImage *jpg = new TJPEGImage();<br />
jpg-&gt;Assign(Image-&gt;Picture-&gt;Bitmap); //kopieren des bildes von image nach jpg<br />
TStringStream *temp=new TStringStream(&quot;&quot;);<br />
ShowMessage(temp-&gt;Size);<br />
jpg-&gt;SaveToStream(temp); //speichern als stringstream<br />
jpg-&gt;SaveToFile(&quot;test.jpg&quot;); //speichern als test.jpg<br />
ShowMessage(temp-&gt;Size);<br />
Log-&gt;Text=temp-&gt;DataString; //log ist ein memo<br />
string x;<br />
ShowMessage(temp-&gt;DataString);<br />
x=temp-&gt;DataString.c_str();<br />
ShowMessage(x.length());</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/74499/tjpgimage-gt-savetostream-stringstream</link><generator>RSS for Node</generator><lastBuildDate>Sat, 27 Jun 2026 23:13:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/74499.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 May 2004 11:29:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TJPGImage-&amp;gt;Savetostream(stringstream) on Fri, 21 May 2004 11:29:18 GMT]]></title><description><![CDATA[<p>ich habe folgendes problem: ich will ein jpg als text in einen string kopieren.<br />
das jpg mit der methode SaveToFile geht ohne probleme,savetostream theoretisch auch,laut TStringStream-&gt;Size sind da irgendwas mit 110k zeichen,was auch stimmen sollte,allerdings wenn ich dann den text mit TStringStream-&gt;DataString<br />
in einen string oder in ein Memo übertragen will enthalten diese immer nur 4 zeichen</p>
<p>TJPEGImage *jpg = new TJPEGImage();<br />
jpg-&gt;Assign(Image-&gt;Picture-&gt;Bitmap); //kopieren des bildes von image nach jpg<br />
TStringStream *temp=new TStringStream(&quot;&quot;);<br />
ShowMessage(temp-&gt;Size);<br />
jpg-&gt;SaveToStream(temp); //speichern als stringstream<br />
jpg-&gt;SaveToFile(&quot;test.jpg&quot;); //speichern als test.jpg<br />
ShowMessage(temp-&gt;Size);<br />
Log-&gt;Text=temp-&gt;DataString; //log ist ein memo<br />
string x;<br />
ShowMessage(temp-&gt;DataString);<br />
x=temp-&gt;DataString.c_str();<br />
ShowMessage(x.length());</p>
]]></description><link>https://www.c-plusplus.net/forum/post/524523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/524523</guid><dc:creator><![CDATA[fux2]]></dc:creator><pubDate>Fri, 21 May 2004 11:29:18 GMT</pubDate></item><item><title><![CDATA[Reply to TJPGImage-&amp;gt;Savetostream(stringstream) on Fri, 21 May 2004 12:21:37 GMT]]></title><description><![CDATA[<p>So eine Memo Box hat nur nen beschränkten Zeichensatz.<br />
Wer weiß was in TStringStream für Zeichen sind. Wahrscheinlich ein Haufen solcher Zeichen &quot;\n&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/524567</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/524567</guid><dc:creator><![CDATA[Diabolo]]></dc:creator><pubDate>Fri, 21 May 2004 12:21:37 GMT</pubDate></item><item><title><![CDATA[Reply to TJPGImage-&amp;gt;Savetostream(stringstream) on Fri, 21 May 2004 13:21:46 GMT]]></title><description><![CDATA[<p>Du solltest KEINE Binaerdaten (Bilder) in einen String (Stream) speichern oder daraus lesen wollen!!! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
<p>Text- Daten (Strings) beenden das Lesen bei 'nem bestimmten Binaerzeichen (^Z). Alles danach ist nicht lesbar, DATEIENDE! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
<p>Fuer Bilder solltest Du typlosen Stream nutzen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/524631</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/524631</guid><dc:creator><![CDATA[DerAltenburger]]></dc:creator><pubDate>Fri, 21 May 2004 13:21:46 GMT</pubDate></item><item><title><![CDATA[Reply to TJPGImage-&amp;gt;Savetostream(stringstream) on Fri, 21 May 2004 13:27:41 GMT]]></title><description><![CDATA[<p>was sollte ich dann fürn typ nehmen?<br />
ich will das ganze als text per sockets verschicken</p>
]]></description><link>https://www.c-plusplus.net/forum/post/524640</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/524640</guid><dc:creator><![CDATA[fux2]]></dc:creator><pubDate>Fri, 21 May 2004 13:27:41 GMT</pubDate></item><item><title><![CDATA[Reply to TJPGImage-&amp;gt;Savetostream(stringstream) on Fri, 21 May 2004 14:01:29 GMT]]></title><description><![CDATA[<p>äh vielleicht ist genau das das Problem? Du kannst binäre Daten numal nicht als String versenden ausser du encodierst sie entsprechend (z.B. Base64)... Ansonsten sind binäre Datentypen (z.b. char-Zeiger, mit Memory (mem*) und nicht mit String (str*)-Funktionen bearbeitet) das Mittel der Wahl. Siehe vielleicht auch in der FAQ unter &quot;Protokollentwicklung&quot;...</p>
<p>-junix</p>
]]></description><link>https://www.c-plusplus.net/forum/post/524681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/524681</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Fri, 21 May 2004 14:01:29 GMT</pubDate></item></channel></rss>