With such a large image however a single blur will not do the job as it will not extend its effects far enough. That is why it suddenly cuts off afetr extending the colors only so far.
I can see now why you were trying to use a sparse color fill..
Assuming you just want to replace the transparency with a average color. here is one way.
This generates a average color using -scale. It then uses distort to generate a tiled canvas from that
color (using the viewport setting that was saved previously)
http://www.imagemagick.org/Usage/distor ... t_viewport
Code: Select all
convert f2fcb51c1b.png -set option:distort:viewport %G \
\( +clone -scale 1x1\! -alpha off \
-filter point -distort SRT 0 +filter \
\) +swap -flatten average_background.png
however as you said you get a dark gray background. -- too dark the image is not that dark!
Hmmm I have found a bug -scale is not handling transparency in images correctly!
Reporting it...
Using -resize will get a correct average color.
Code: Select all
convert f2fcb51c1b.png -set option:distort:viewport %G \
\( +clone -filter box -resize 1x1\! +filter -alpha off \
-filter point -distort SRT 0 +filter \
\) +swap -flatten average_background.png
Still very grey but not so dark...
So lets get the average of just the 3 pixels around the edge of the image
Code: Select all
convert f2fcb51c1b.png -set option:distort:viewport %G \
\( +clone -channel A -morphology EdgeIn Square:3 +channel \
-filter box -resize 1x1\! +filter -alpha off \
-filter point -distort SRT 0 +filter \
\) +swap -flatten edge_background.png
A nice drak brick color. Much of the darkness here is from the black edge pixels on the right side of the image
Lets trim the 'bad' outside edge, then average the next three pixels into the image...
Code: Select all
convert f2fcb51c1b.png -set option:distort:viewport %G \
\( +clone -channel A -morphology Erode Square:1\
-morphology EdgeIn Square:3 +channel \
-filter box -resize 1x1\! +filter -alpha off \
-filter point -distort SRT 0 +filter \
\) +swap -flatten edge_background_2.png
A much improved 'brick color'.
It seems your image edge is not very good!
Now for Shepards.... using resize bluring (but with the whole image)
Image largest dimension is 1280 which means we need at least 11 resizes but more will work too..
Code: Select all
convert f2fcb51c1b.png -filter Box \
\( +clone -resize 50% \) \( +clone -resize 50% \) \( +clone -resize 50% \) \
\( +clone -resize 50% \) \( +clone -resize 50% \) \( +clone -resize 50% \) \
\( +clone -resize 50% \) \( +clone -resize 50% \) \( +clone -resize 50% \) \
\( +clone -resize 50% \) \( +clone -resize 50% \) \( +clone -resize 50% \) \
-layers RemoveDups -filter Gaussian -resize 1280x853\! -reverse \
-background None -flatten -alpha off shepards_background.png
Note that the command is long, but it is quite FAST!
Note as I did not extract the edge; the average color is the image average.
But you get a shepards halo effect around the image.
This does not appear to be very strong due to the effect of color leaking from the inside pixels.
You can see that leakage of color near the 'black' window pane causing a dark halo effect just outside the image edge.
Your probably better off using average.