Graphics as Input

An image is equivalent to its symbolic expression. You can operate on an image as you would on a symbolic expression.

This input produces some disks:

Graphics[Table[{RGBColor[i/2,.7,j/2],Disk[{2 i,2j}]},{i,0,2},{j,0,2}]]

Type // (RefLink[InputForm, paclet:ref/InputForm]) after the graphic to get the symbolic expression that corresponds to the graphic:

Graphics[Table[{RGBColor[i/2,.7,j/2],Disk[{2 i,2j}]},{i,0,2},{j,0,2}]]

//InputForm

Type a Wolfram Language (RefLink[Replace, paclet:ref/Replace]) command after the output graphic and evaluate:

/.Disk->Rectangle

The disks are now replaced by squares.