Here's an example program in Python that takes an image file and outputs the average RGB color of all pixels:

```
from PIL import Image
 
# Open image file
image = Image.open("image.jpg")
 
# Get image dimensions
width, height = image.size
 
# Initialize total RGB values
total_red = 0
total_green = 0
total_blue = 0
 
# Loop through each pixel and add RGB values
for x in range(width):
    for y in range(height):
        r, g, b = image.getpixel((x,y))
        total_red += r
        total_green += g
        total_blue += b
 
# Calculate average RGB values
pixel_count = width * height
avg_red = total_red // pixel_count
avg_green = total_green // pixel_count
avg_blue = total_blue // pixel_count
 
# Print average RGB values
print("Average color (RGB): ({}, {}, {})".format(avg_red, avg_green, avg_blue))
```

Note that this program uses the Python Imaging Library (PIL) to open and manipulate the image file. You'll need to install the library before running the program.
Scrivete un programma che prenda un'immagine e restituisca il colore medio di tutti i pixel.