```python
def setup():
global img
py5.size(300, 300, py5.P2D)
img = py5.load_image("berlin-1.jpg")
py5.texture_mode(py5.NORMAL)
def draw():
py5.background(0)
py5.translate(py5.width//2, py5.height//2)
py5.rotate(py5.remap(py5.mouse_x, 0, py5.width, -py5.PI, py5.PI))
if py5.is_mouse_pressed:
py5.texture_wrap(py5.REPEAT)
else:
py5.texture_wrap(py5.CLAMP)
py5.begin_shape()
py5.texture(img)
py5.vertex(-100, -100, 0, 0)
py5.vertex(100, -100, 2, 0)
py5.vertex(100, 100, 2, 2)
py5.vertex(-100, 100, 0, 2)
py5.end_shape()
```