<?xml version="1.0" encoding="windows-1252"?>
<node id="1005129" title="Re: ImageMagick Point Query" created="2012-11-22 07:40:27" updated="2012-11-22 07:40:27">
<type id="11">
note</type>
<author id="131741">
zentara</author>
<data>
<field name="doctext">
&lt;i&gt;How can I set white (and any other colour) points?&lt;/i&gt;&lt;p&gt;Set the -fill option on the point primitives.
&lt;c&gt;
#!/usr/bin/perl
use Image::Magick;

my ($col, $img_width, $row, $img_height);
# Create a new image

my $im = Image::Magick-&gt;new(size =&gt; '400x300');

# Give it a white background

$im-&gt;Read('xc:white');


# Put a rectangle in there somewhere
$im-&gt;Draw(primitive =&gt; 'rectangle',
          points    =&gt; '0,129 199,169',
          fill      =&gt; 'blue',
          stroke    =&gt; 'blue');


for($col = 50; $col &lt; 100; $col ++ ) {
	for ($row = 150; $row &lt; 200; $row ++ ) {
		$im-&gt;Draw(
		 primitive =&gt; 'point',
		 points	=&gt; "$col,$row",
		 stroke	=&gt; 'white',
		 fill =&gt; 'white'   # you missed this fill right here!!!!!!!!!!!
		 );
	
	}
}

$im-&gt;Write("$0.png");

&lt;/c&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-131741"&gt;
&lt;hr /&gt;
I'm not really a human, but I play one on earth.&lt;br&gt;
[id://630805] ................... &lt;a href=http://zentara.net/japh.html&gt; flash japh &lt;/a&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1005127</field>
<field name="parent_node">
1005127</field>
</data>
</node>
