<?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[Bilder stretchen]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich habe ein Bild und möchte das gern in der Dimension ändern(Höhe oder/und Breite) und auch diese Änderung abspeichern. Weiss jemand wie man dies realisiert?</p>
<p>Man kann TImage auf Stretch=true stellen, jedoch speichert er das Bild trotzdem in der Orginal Dimension.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/113161/bilder-stretchen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 04:33:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/113161.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jun 2005 10:38:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bilder stretchen on Mon, 20 Jun 2005 10:38:27 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich habe ein Bild und möchte das gern in der Dimension ändern(Höhe oder/und Breite) und auch diese Änderung abspeichern. Weiss jemand wie man dies realisiert?</p>
<p>Man kann TImage auf Stretch=true stellen, jedoch speichert er das Bild trotzdem in der Orginal Dimension.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/813085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/813085</guid><dc:creator><![CDATA[murxx]]></dc:creator><pubDate>Mon, 20 Jun 2005 10:38:27 GMT</pubDate></item><item><title><![CDATA[Reply to Bilder stretchen on Mon, 20 Jun 2005 11:12:20 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>TImage::Stretch ist nur für Anzeige des Bitmaps entscheident, nicht für die Daten des Bitmaps selber.<br />
Du must dir selber eine Routine schreiben bzw. im Netz suchen, die die einzelnen Pixel umrechnet.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/813110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/813110</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 20 Jun 2005 11:12:20 GMT</pubDate></item><item><title><![CDATA[Reply to Bilder stretchen on Mon, 20 Jun 2005 11:12:21 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;jpeg.hpp&gt;
</code></pre>
<p>...</p>
<pre><code class="language-cpp">TJPEGImage *jpg = new TJPEGImage();
 jpg-&gt;LoadFromFile( asAKTUELLER_FILE );
 jpg-&gt;Width=iYourWidth;
 jpg-&gt;Height=iYourHeight;;
 jpg-&gt;SaveToFile( asCopyFile );
 delete jpg;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/813113</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/813113</guid><dc:creator><![CDATA[YLIREBUS]]></dc:creator><pubDate>Mon, 20 Jun 2005 11:12:21 GMT</pubDate></item><item><title><![CDATA[Reply to Bilder stretchen on Mon, 20 Jun 2005 11:26:44 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>@YLIBERUS : Hast du denn deinen Quellcode mal ausprobiert?<br />
Wenn ich das an einen JPG ausprobiere, kommt nur der Fehler &quot;Die Größe eines JPEG kann nicht geändert werden&quot; (hätte mich auch gewundert, wenn es anders wäre)</p>
<p>Ersetzt man hingegen TJPEGImage durch Graphics::Bitmap, und verwendet ein Bitmap, kommt zwar kein fehler, aber das Bitmap wird nur um einen entsprechenden Rand erweitert, nicht vergrößert.</p>
<p>Dazu braucht man nämlich einen speziellen Alogorithmus, damit es halbwegs anständig aussieht.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/813125</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/813125</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 20 Jun 2005 11:26:44 GMT</pubDate></item><item><title><![CDATA[Reply to Bilder stretchen on Mon, 20 Jun 2005 11:44:18 GMT]]></title><description><![CDATA[<p>sorry habe nur etwas vergessen (ist schon etwas her das ich das mal gemacht habe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> )</p>
<pre><code class="language-cpp">#include &lt;jpeg.hpp&gt;
#include &quot;math.h&quot;

Graphics::TBitmap *bmp = new Graphics::TBitmap();
Graphics::TBitmap *bmp2 = new Graphics::TBitmap();
 TJPEGImage *jpg = new TJPEGImage();
 jpg-&gt;LoadFromFile( &quot;c:\\test.jpg&quot; );

 TRect *ARect = new TRect;
 ARect-&gt;Top    	 = 0;
 ARect-&gt;Left   	 = 0;
 ARect-&gt;Right  	 = floor(ineueBreite);
 ARect-&gt;Bottom 	 = floor(ineueHoehe);

 bmp-&gt;Assign(jpg);
 bmp2-&gt;Width   	 = ineueBreite;
 bmp2-&gt;Height  	 = ineueHoehe;
 bmp2-&gt;Canvas-&gt;StretchDraw(*ARect,bmp);

 jpg-&gt;Assign(bmp2);
jpg-&gt;SaveToFile( &quot;c:\\test999guido.jpg&quot; );
delete jpg;
delete bmp;
delete bmp2;
</code></pre>
<p>P.S. Ich habe es jetzt probiert und es funzt. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/813144</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/813144</guid><dc:creator><![CDATA[YLIREBUS]]></dc:creator><pubDate>Mon, 20 Jun 2005 11:44:18 GMT</pubDate></item><item><title><![CDATA[Reply to Bilder stretchen on Mon, 20 Jun 2005 13:19:14 GMT]]></title><description><![CDATA[<p>Gleich mal ausprobieren. Vielen Dank! :=)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/813239</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/813239</guid><dc:creator><![CDATA[murxx]]></dc:creator><pubDate>Mon, 20 Jun 2005 13:19:14 GMT</pubDate></item></channel></rss>