Page 1 of 1

Script to take sample color from image

Posted: Sat May 20, 2017 1:37 pm
by Freedox
Heya, I hope someone has a solution to this... as that would save weeks of work...

So I have 50k+ images that I need a sample size colour from the image. In other words, I have an image with a t-shirt and I need 50x50 size image of that t-shirt colour. I could record a script to take a sample 50x50 size from the middle of canvas but not everything is placed in the middle of the image. So what I would need first:
1. To find an AVERAGE colour in the canvas (minus WHITE 255 255 255).
2. Set coordinates for that average colour and take 50x50 size sample around that AVERAGE pixel.
3. Save + Close

Sounds simple when you put in words... but... not in practice :)

Re: Script to take sample color from image

Posted: Sun May 21, 2017 8:51 am
by txuku
Bonjour

Hum................



Difficult to apprehend ...............

Can you explain us with pictures? :)

Re: Script to take sample color from image

Posted: Fri Sep 22, 2017 10:47 pm
by iMatt
I agree that we may need some images that illustrate your problem more clearly. But I thought I would point out that you don't need a script to generate the average color of the canvas you can simple go to Filter>Blur>Average, and this will generate the average color of the document.