Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the colour of a pixel in rMagick

Tags:

rmagick

I have 2 images, logo and background, logo is a small image that I place in the centre of background. To make the image look better im trying to make it so that it picks up the colour at the edge of logo and sets it at as the background colour of background.

Ive got everything working bar the colour finder. I can't find anything that looks like what I want. I would be expecting:

logo.colour_at(0,0)

Anyone know how to do this?

like image 809
Arcath Avatar asked Feb 27 '23 22:02

Arcath


1 Answers

This is done by:

logo.pixel_color(0,0)
like image 111
Arcath Avatar answered Mar 16 '23 14:03

Arcath