Page 1 of 1
Replace pixel color of an image
Posted: Thu Aug 16, 2012 7:31 pm
by jmburnod
Hi All,
I need to replace white pixels of an image with blue pixels
Does someone have a useful script to do that ?
Thanks
Jean-Marc
Re: Replace pixel color of an image
Posted: Thu Aug 16, 2012 8:46 pm
by bn
Salut Jean-Marc,
here is a little stack that replaces white pixels with blue pixels. Please look at the explanation and the script of the button.
Kind regards
Bernd
Re: Replace pixel color of an image
Posted: Thu Aug 16, 2012 9:01 pm
by dunbarx
Jean-Marc:
Shades of Steve Maller's "ThePixel" XFCN for HC, or Rinaldi's "PixelColor". All from around the Pleistocene.
These returned the value of the pixel under the cursor. But read-only.
And Matthew Reagan wrote a XCMD that would change all the black pixels to any color. close to what you wanted.
It seems impossible that LC does not have a "setPixel" command and "getPixel" function. Could not find one, though.
Craig
Re: Replace pixel color of an image
Posted: Thu Aug 16, 2012 9:05 pm
by dunbarx
Bernd.
Ah. So there is such a tool, even though it requires that the entire imageData be processed. Very cool.
Craig
Re: Replace pixel color of an image
Posted: Thu Aug 16, 2012 9:23 pm
by jmburnod
Bernd, Craig,
Thank for your fast reply
I will test the Bernd's stack tomorrow
Kind regards
Jean-Marc