01-18-2018, 11:22 PM
(This post was last modified: 01-18-2018, 11:23 PM by trandoductin.)
description of what i am trying to do
So I have a script right now it's doing this
loop through source image for each tile, copy and paste as pattern (difference mode) over top of tile image.
loop through each tile of a visible copy and look at r,g,b using
make selection of the tile.
look at r+g+b value and pick the tile with lowest sum consider that the best match....
and then compose an image using those best match tiles...
what's taking along time right now is this process of selecting the tile and using gimp_histogram...
Is there anyway i could possibly speed this up?
I can't think of one.
So I have a script right now it's doing this
loop through source image for each tile, copy and paste as pattern (difference mode) over top of tile image.
loop through each tile of a visible copy and look at r,g,b using
make selection of the tile.
Code:
r, _, _, _, _, _ = pdb.gimp_histogram(comp_layer,HISTOGRAM_RED,0,255)
g, _, _, _, _, _ = pdb.gimp_histogram(comp_layer,HISTOGRAM_GREEN,0,255)
b, _, _, _, _, _ = pdb.gimp_histogram(comp_layer,HISTOGRAM_BLUE,0,255)
and then compose an image using those best match tiles...
what's taking along time right now is this process of selecting the tile and using gimp_histogram...
Is there anyway i could possibly speed this up?
I can't think of one.