Someone in the Coppermine forums asked if Coppermine could auto-adjust background to image. My initial response was that it couldn’t do it with the core code, and I didn’t know if the image libraries that Coppermine used could do it.
After some research, I found that GD2 could do it, or at least help me do it. I thought it would be cool to implement in my own gallery so I decided to code it myself. The code is in the thread above. Check out my portfolio album with the feature. As you go through the images, the “matte” surrounding the image will change color to match the most dominant color in a random sampling of pixels in the image.