Put a clamp on it

I wanted to have a background that is horizontally centered, and clamp the pixels on the left and right side. It seems as though clamping is only for pixels to the right and bottom of an image. This called for some image handling to get the missing clamp.