[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Getting the color of a pixel

Thomas

12/26/2005 9:14:00 PM

Hi,

I have a few questions about RMagick:

1. How do I get the color of a specific pixel? (By giving it the
coordinates of the pixel)
2. How do I store parts of a picture to a file? (So like everything
between points (3,7) and (90,300))

Thanks,

Thomas

--
Posted via http://www.ruby-....


42 Answers

Antonio Cangiano

12/27/2005 3:29:00 AM

0

Thomas wrote:
> Hi,

Hi Thomas,

> 1. How do I get the color of a specific pixel? (By giving it the
> coordinates of the pixel)

Image.pixel_color:
http://www.simplesystems.org/RMagick/doc/image2.html#p...

> 2. How do I store parts of a picture to a file? (So like everything
> between points (3,7) and (90,300))

You could use:
Image.crop(x, y, width, height)

Where x and y are the offsets of the rectangle relative to the
upper-left corner of the image. width and height are the dimensions of
your desidered region.
http://www.simplesystems.org/RMagick/doc/image1...


Cheers,
Antonio
--
Antonio Cangiano
My Ruby blog: http://www.antonioca...

Carolina Reb

1/13/2013 12:03:00 AM

0

On Jan 12, 3:46 pm, The Revd <peel...@degenerate.Grik> wrote:
>
>
> Ten years is TOO LONG.

Being a Yid himself, Kissinger is likely being hopelessly optomistic.

The Revd

1/13/2013 12:28:00 AM

0

On Sat, 12 Jan 2013 16:03:14 -0800 (PST), Carolina Reb
<walt.hampton@att.net> wrote:

>On Jan 12, 3:46?pm, The Revd <peel...@degenerate.Grik> wrote:
>>
>>
>> Ten years is TOO LONG.
>
>Being a Yid himself, Kissinger is likely being hopelessly optomistic.

Two things he did say make him stand out from the rest:

"If it were not for the accident of my birth, I would be
anti-Semitic."
and
"Any people who have been persecuted for two thousand years must be
doing something wrong."
-- Kissinger: A Biography
by Walter Isaacson
pp 561, Chapter "The Shuttle"

Carolina Reb

1/13/2013 12:37:00 AM

0

On Jan 12, 4:28 pm, The Revd <peel...@degenerate.Grik> wrote:
>
>
> Two things he did say make him stand out from the rest:
>
> "If it were not for the accident of my birth, I would be
> anti-Semitic."
>         and
> "Any people who have been persecuted for two thousand years must be
> doing something wrong."
> --  Kissinger: A Biography
>      by Walter Isaacson
>      pp 561, Chapter "The Shuttle"

Good info Revd. I owe you one!

Janithor

1/13/2013 2:36:00 AM

0

x-no-archive: yes

On 1/12/2013 3:46 PM, The Revd wrote:
> On Sat, 12 Jan 2013 14:57:52 -0800 (PST), Carolina Reb
> <walt.hampton@att.net> wrote:
>
>> Israel is facing several immense, existential crises. The Israeli
>> economy is utterly dependent on American handouts that total more than
>> a trillion dollars and counting, according to the Christian Science
>> Monitor; and economic inequality in Israel has sparked massive
>> protests. The different groups of Jews in Israel ? orthodox, reformed,
>> secular, ashkenazi, sephardic, settlers, peaceniks, white, black,
>> brown ? are endlessly squabbling with each other, and with the Israeli
>> and Palestinian Arabs. Israel?s neighbors, the people of the Middle
>> East, do not accept it as a legitimate state. The Palestinian ethnic
>> cleansing victims are not going away, they are winning the demographic
>> race with Israeli Jews. Israel is increasingly despised everywhere,
>> including in the US, and has been named as the leading threat to world
>> peace in European public opinion polls. Palestine is now accepted as a
>> state at the United Nations. And Israel has lost three small-scale
>> wars to Hezbollah and Hamas during the past six years. Many analysts,
>> including Henry Kissinger, have stated that Israel will not exist ten
>> years from now.
>>
>>
>> http://www.veteranstoday.com/2013/01/11/scapegoa...
>>
>>
>> Kewel!
>
> Ten years is TOO LONG.


Hi Revd.

The Revd

1/13/2013 2:46:00 AM

0

On Sat, 12 Jan 2013 18:36:14 -0800, Janithor <Janithor@comcast.net>
wrote:

x-no-archive: no

>x-no-archive: yes
>
>On 1/12/2013 3:46 PM, The Revd wrote:
>> On Sat, 12 Jan 2013 14:57:52 -0800 (PST), Carolina Reb
>> <walt.hampton@att.net> wrote:
>>
>>> Israel is facing several immense, existential crises. The Israeli
>>> economy is utterly dependent on American handouts that total more than
>>> a trillion dollars and counting, according to the Christian Science
>>> Monitor; and economic inequality in Israel has sparked massive
>>> protests. The different groups of Jews in Israel ? orthodox, reformed,
>>> secular, ashkenazi, sephardic, settlers, peaceniks, white, black,
>>> brown ? are endlessly squabbling with each other, and with the Israeli
>>> and Palestinian Arabs. Israel?s neighbors, the people of the Middle
>>> East, do not accept it as a legitimate state. The Palestinian ethnic
>>> cleansing victims are not going away, they are winning the demographic
>>> race with Israeli Jews. Israel is increasingly despised everywhere,
>>> including in the US, and has been named as the leading threat to world
>>> peace in European public opinion polls. Palestine is now accepted as a
>>> state at the United Nations. And Israel has lost three small-scale
>>> wars to Hezbollah and Hamas during the past six years. Many analysts,
>>> including Henry Kissinger, have stated that Israel will not exist ten
>>> years from now.
>>>
>>>
>>> http://www.veteranstoday.com/2013/01/11/scapegoa...
>>>
>>>
>>> Kewel!
>>
>> Ten years is TOO LONG.
>
>
>Hi Revd.

Hi Janithurd!

Janithor

1/13/2013 2:49:00 AM

0

x-no-archive: yes

On 1/12/2013 6:45 PM, The Revd wrote:
> On Sat, 12 Jan 2013 18:36:14 -0800, Janithor <Janithor@comcast.net>
> wrote:
>
> x-no-archive: no
>
>> x-no-archive: yes
>>
>> On 1/12/2013 3:46 PM, The Revd wrote:
>>> On Sat, 12 Jan 2013 14:57:52 -0800 (PST), Carolina Reb
>>> <walt.hampton@att.net> wrote:
>>>
>>>> Israel is facing several immense, existential crises. The Israeli
>>>> economy is utterly dependent on American handouts that total more than
>>>> a trillion dollars and counting, according to the Christian Science
>>>> Monitor; and economic inequality in Israel has sparked massive
>>>> protests. The different groups of Jews in Israel ? orthodox, reformed,
>>>> secular, ashkenazi, sephardic, settlers, peaceniks, white, black,
>>>> brown ? are endlessly squabbling with each other, and with the Israeli
>>>> and Palestinian Arabs. Israel?s neighbors, the people of the Middle
>>>> East, do not accept it as a legitimate state. The Palestinian ethnic
>>>> cleansing victims are not going away, they are winning the demographic
>>>> race with Israeli Jews. Israel is increasingly despised everywhere,
>>>> including in the US, and has been named as the leading threat to world
>>>> peace in European public opinion polls. Palestine is now accepted as a
>>>> state at the United Nations. And Israel has lost three small-scale
>>>> wars to Hezbollah and Hamas during the past six years. Many analysts,
>>>> including Henry Kissinger, have stated that Israel will not exist ten
>>>> years from now.
>>>>
>>>>
>>>> http://www.veteranstoday.com/2013/01/11/scapegoa...
>>>>
>>>>
>>>> Kewel!
>>>
>>> Ten years is TOO LONG.
>>
>>
>> Hi Revd.
>
> Hi Janithurd!


If you ever make it to Sacramento, maybe we could go to shul together.

The Revd

1/13/2013 3:05:00 AM

0

On Sat, 12 Jan 2013 18:48:50 -0800, Janithor <Janithor@comcast.net>
wrote:

>x-no-archive: yes
>
>On 1/12/2013 6:45 PM, The Revd wrote:
>> On Sat, 12 Jan 2013 18:36:14 -0800, Janithor <Janithor@comcast.net>
>> wrote:
>>
>> x-no-archive: no
>>
>>> x-no-archive: yes
>>>
>>> On 1/12/2013 3:46 PM, The Revd wrote:
>>>> On Sat, 12 Jan 2013 14:57:52 -0800 (PST), Carolina Reb
>>>> <walt.hampton@att.net> wrote:
>>>>
>>>>> Israel is facing several immense, existential crises. The Israeli
>>>>> economy is utterly dependent on American handouts that total more than
>>>>> a trillion dollars and counting, according to the Christian Science
>>>>> Monitor; and economic inequality in Israel has sparked massive
>>>>> protests. The different groups of Jews in Israel ? orthodox, reformed,
>>>>> secular, ashkenazi, sephardic, settlers, peaceniks, white, black,
>>>>> brown ? are endlessly squabbling with each other, and with the Israeli
>>>>> and Palestinian Arabs. Israel?s neighbors, the people of the Middle
>>>>> East, do not accept it as a legitimate state. The Palestinian ethnic
>>>>> cleansing victims are not going away, they are winning the demographic
>>>>> race with Israeli Jews. Israel is increasingly despised everywhere,
>>>>> including in the US, and has been named as the leading threat to world
>>>>> peace in European public opinion polls. Palestine is now accepted as a
>>>>> state at the United Nations. And Israel has lost three small-scale
>>>>> wars to Hezbollah and Hamas during the past six years. Many analysts,
>>>>> including Henry Kissinger, have stated that Israel will not exist ten
>>>>> years from now.
>>>>>
>>>>>
>>>>> http://www.veteranstoday.com/2013/01/11/scapegoa...
>>>>>
>>>>>
>>>>> Kewel!
>>>>
>>>> Ten years is TOO LONG.
>>>
>>>
>>> Hi Revd.
>>
>> Hi Janithurd!
>
>
>If you ever make it to Sacramento, maybe we could go to shul together.

Where's Sacramento? What's a shul?

Janithor

1/13/2013 3:40:00 AM

0

x-no-archive: yes

On 1/12/2013 7:05 PM, The Revd wrote:
> On Sat, 12 Jan 2013 18:48:50 -0800, Janithor <Janithor@comcast.net>
> wrote:
>
>> x-no-archive: yes
>>
>> On 1/12/2013 6:45 PM, The Revd wrote:
>>> On Sat, 12 Jan 2013 18:36:14 -0800, Janithor <Janithor@comcast.net>
>>> wrote:
>>>
>>> x-no-archive: no
>>>
>>>> x-no-archive: yes
>>>>
>>>> On 1/12/2013 3:46 PM, The Revd wrote:
>>>>> On Sat, 12 Jan 2013 14:57:52 -0800 (PST), Carolina Reb
>>>>> <walt.hampton@att.net> wrote:
>>>>>
>>>>>> Israel is facing several immense, existential crises. The Israeli
>>>>>> economy is utterly dependent on American handouts that total more than
>>>>>> a trillion dollars and counting, according to the Christian Science
>>>>>> Monitor; and economic inequality in Israel has sparked massive
>>>>>> protests. The different groups of Jews in Israel ? orthodox, reformed,
>>>>>> secular, ashkenazi, sephardic, settlers, peaceniks, white, black,
>>>>>> brown ? are endlessly squabbling with each other, and with the Israeli
>>>>>> and Palestinian Arabs. Israel?s neighbors, the people of the Middle
>>>>>> East, do not accept it as a legitimate state. The Palestinian ethnic
>>>>>> cleansing victims are not going away, they are winning the demographic
>>>>>> race with Israeli Jews. Israel is increasingly despised everywhere,
>>>>>> including in the US, and has been named as the leading threat to world
>>>>>> peace in European public opinion polls. Palestine is now accepted as a
>>>>>> state at the United Nations. And Israel has lost three small-scale
>>>>>> wars to Hezbollah and Hamas during the past six years. Many analysts,
>>>>>> including Henry Kissinger, have stated that Israel will not exist ten
>>>>>> years from now.
>>>>>>
>>>>>>
>>>>>> http://www.veteranstoday.com/2013/01/11/scapegoa...
>>>>>>
>>>>>>
>>>>>> Kewel!
>>>>>
>>>>> Ten years is TOO LONG.
>>>>
>>>>
>>>> Hi Revd.
>>>
>>> Hi Janithurd!
>>
>>
>> If you ever make it to Sacramento, maybe we could go to shul together.
>
> Where's Sacramento? What's a shul?


Sacramento is the capital of California. California is the largest
state in the United States of America, which is the most powerful
country on the planet.

shul = http://www.youtube.com/watch?v=S...

Aliktophiles

1/13/2013 4:41:00 AM

0

On 1/12/2013 7:36 PM, Janithor wrote:
> x-no-archive: yes
>
> On 1/12/2013 3:46 PM, The Revd wrote:
>> On Sat, 12 Jan 2013 14:57:52 -0800 (PST), Carolina Reb
>> <walt.hampton@att.net> wrote:
>>
>>> Israel is facing several immense, existential crises. The Israeli
>>> economy is utterly dependent on American handouts that total more than
>>> a trillion dollars and counting, according to the Christian Science
>>> Monitor; and economic inequality in Israel has sparked massive
>>> protests. The different groups of Jews in Israel ? orthodox, reformed,
>>> secular, ashkenazi, sephardic, settlers, peaceniks, white, black,
>>> brown ? are endlessly squabbling with each other, and with the Israeli
>>> and Palestinian Arabs. Israel?s neighbors, the people of the Middle
>>> East, do not accept it as a legitimate state. The Palestinian ethnic
>>> cleansing victims are not going away, they are winning the demographic
>>> race with Israeli Jews. Israel is increasingly despised everywhere,
>>> including in the US, and has been named as the leading threat to world
>>> peace in European public opinion polls. Palestine is now accepted as a
>>> state at the United Nations. And Israel has lost three small-scale
>>> wars to Hezbollah and Hamas during the past six years. Many analysts,
>>> including Henry Kissinger, have stated that Israel will not exist ten
>>> years from now.
>>>
>>>
>>> http://www.veteranstoday.com/2013/01/11/scapegoa...
>>>
>>>
>>> Kewel!
>>
>> Ten years is TOO LONG.
>
>
> Hi Revd.
>

Henry Kissinger will not exist ten years from now. How
am I supposed to get my satisfaction?

--
This time we will get them all.