I have a bidimensional array with RGB values (ej: "0,0,0") and I'm trying to generate an image drawing it pixel by pixel. It works fine but it takes too long time. The bash script is something like this:
Code: Select all
[...]
convert -size ${size_x}x${size_y} xc:none accppt.png
for ((y=1;y<${size_y};y++)) do
for ((x=1;x<${size_x};x++)) do
mogrify -fill "rgb(${array_ACCPPT[${x},${y}]})" -draw "point ${x},${y}" accppt.png
done
done
[...]
Is there any way to paint all the pixels at once?
Array size is about 500x500 pixels.
Thanks in advance.