﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Community%3AScience%2FRobotics%2FScripts%2FImageGrabber</id>
	<title>Community:Science/Robotics/Scripts/ImageGrabber - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Community%3AScience%2FRobotics%2FScripts%2FImageGrabber"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Community:Science/Robotics/Scripts/ImageGrabber&amp;action=history"/>
	<updated>2026-04-20T16:54:01Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Community:Science/Robotics/Scripts/ImageGrabber&amp;diff=87591&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Community:Science/Robotics/Scripts/ImageGrabber&amp;diff=87591&amp;oldid=prev"/>
		<updated>2018-06-28T18:41:25Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 18:41時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Community:Science/Robotics/Scripts/ImageGrabber&amp;diff=87590&amp;oldid=prev</id>
		<title>wiki&gt;Mindrones: moved Robotics/Scripts/ImageGrabber to Community:Science/Robotics/Scripts/ImageGrabber: moving under Community:Science (&quot;Community&quot; being a new namespace)</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Community:Science/Robotics/Scripts/ImageGrabber&amp;diff=87590&amp;oldid=prev"/>
		<updated>2011-11-02T19:51:48Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/Robotics/Scripts/ImageGrabber&quot; class=&quot;mw-redirect&quot; title=&quot;Robotics/Scripts/ImageGrabber&quot;&gt;Robotics/Scripts/ImageGrabber&lt;/a&gt; to &lt;a href=&quot;/Community:Science/Robotics/Scripts/ImageGrabber&quot; title=&quot;Community:Science/Robotics/Scripts/ImageGrabber&quot;&gt;Community:Science/Robotics/Scripts/ImageGrabber&lt;/a&gt;: moving under Community:Science (&amp;quot;Community&amp;quot; being a new namespace)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Image Grabber =&lt;br /&gt;
&lt;br /&gt;
The script grabs a very small portion of screen (8px X 8px) around the current position of the mouse, through the OpenGL buffer, and save it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
import Blender&lt;br /&gt;
&lt;br /&gt;
from Blender.BGL import *&lt;br /&gt;
import Image&lt;br /&gt;
&lt;br /&gt;
coords = Blender.Window.GetMouseCoords()&lt;br /&gt;
&lt;br /&gt;
imX = 8&lt;br /&gt;
imY = 8&lt;br /&gt;
&lt;br /&gt;
depth = 3 # 3 channels RGB&lt;br /&gt;
&lt;br /&gt;
buf = Buffer(GL_BYTE, imX * imY * depth)&lt;br /&gt;
&lt;br /&gt;
glReadPixels(coords[0], coords[1], imX, imY, GL_RGB, GL_BYTE, buf)&lt;br /&gt;
&lt;br /&gt;
image = Image.new('RGB', (imX, imY))&lt;br /&gt;
&lt;br /&gt;
for i in range(imX):&lt;br /&gt;
	for j in range(imY):&lt;br /&gt;
		pos = (i * imY + j) * depth&lt;br /&gt;
		image.putpixel((i, j), ( buf.list[pos], buf.list[pos + 1], buf.list[pos + 2]))&lt;br /&gt;
&lt;br /&gt;
image = image.transpose(2) #rotate 90 degre&lt;br /&gt;
image.save('test.png')&lt;br /&gt;
&lt;br /&gt;
print 'Image saved'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>wiki&gt;Mindrones</name></author>
		
	</entry>
</feed>