<?xml version="1.0" encoding="UTF-8"?>
<article>
  <body>&#12385;&#12423;&#12387;&#12392;&#12524;&#12531;&#12480;&#12522;&#12531;&#12464;&#32080;&#26524;&#12434;&#21205;&#30011;&#12395;&#12375;&#12390;&#30906;&#35469;&#12375;&#12383;&#12356;&#22580;&#21512;&#12395;&#12289;.txt&#24418;&#24335;&#12391;&#20986;&#21147;&#12375;&#12390;convert &#65288;ImageMagick&#65289;&#12377;&#12427;&#12392;&#20415;&#21033;&#12391;&#12377;&#12290;

c&gt;&gt;
/*
 * Output image
 */
std::vector&lt;unsigned char&gt; buf(3*width*height);
glFlush();
glReadBuffer(GL_BACK);       
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glReadPixels(0, 0, width, height,
    GL_RGB, GL_UNSIGNED_BYTE, &amp;buf[0]);
    
char filename[1024];
sprintf(filename, &quot;%s_%04d.txt&quot;, basename, frame);
FILE *fp = fopen(filename, &quot;w&quot;);
fprintf(fp,
    &quot;# ImageMagick pixel enumeration: %d,%d,%d,rgb\n&quot;,
    width, height, 255);
for(int y = 0; y &lt; host-&gt;height; ++y){
    for(int x = 0; x &lt; host-&gt;width; ++x){
        int idx = (host-&gt;height - y - 1)*host-&gt;width + x;
        fprintf(fp, &quot;%d,%d: (%d,%d,%d)\n&quot;,
            x, y, 
            buf[3*idx + 0],
            buf[3*idx + 1],
            buf[3*idx + 2]);
    } 
}
fclose(fp);
&lt;&lt;--

&#20986;&#26469;&#19978;&#12364;&#12387;&#12383;&#12425;&#12289;

pre&gt;&gt;
% convert basename_*.txt basename.mp4
&lt;&lt;--</body>
  <cached-tag-list>memo</cached-tag-list>
  <comments-count type="integer">0</comments-count>
  <created-at type="datetime">2010-01-30T15:13:58+00:00</created-at>
  <daily-archive-id type="integer">1326</daily-archive-id>
  <filter-type>blue_stole</filter-type>
  <id type="integer">1699</id>
  <monthly-archive-id type="integer">208</monthly-archive-id>
  <pdf-digest nil="true"></pdf-digest>
  <permalink nil="true"></permalink>
  <published-at type="datetime">2010-01-30T15:07:00+00:00</published-at>
  <secret>69b21595-ddc1-4cd8-ad1d-e7275786cd86</secret>
  <title>&#12486;&#12473;&#12488;&#29992;&#12395;&#36899;&#30058;&#30011;&#20687;&#12434;&#20986;&#21147;&#12375;&#12390;&#21205;&#30011;&#12434;&#20316;&#25104;&#12375;&#12383;&#12356;&#22580;&#21512;&#12398;&#12513;&#12514;</title>
  <updated-at type="datetime">2010-01-30T15:13:58+00:00</updated-at>
  <user-id type="integer">1</user-id>
</article>
