# Player_Media

Lets a player choose which part of their avatar and cover image is shown, and go back to the defaults.

The position is a focal point (`x`, `y`, 0 to 1, the same meaning as CSS `object-position` percentages and the Cover block's focal
point) and a zoom (1 to 4).

- **Cover:** the full image is kept; the position and zoom are stored (`cp_player_cover_position_x/y`, `cp_player_cover_zoom`) and
  applied when the cover is drawn (`object-position` plus a scale around the focal point).
- **Avatar:** avatars are drawn in many places from a plain image address, so the chosen part is cut out of the original as a
  square and saved as the avatar (`cp_player_avatar_id`). The original stays as `cp_player_avatar_source_id` so the position can be
  changed later.

Both are saved by the normal player settings save (`clanbite_save_player_settings`) through these form fields:
`profile_avatar_focal_x`, `profile_avatar_focal_y`, `profile_avatar_zoom`, `profile_avatar_remove`, `profile_cover_position_x`,
`profile_cover_position_y`, `profile_cover_zoom` and `profile_cover_remove`.

## Changelog

| Version | Description |
| --- | --- |
| 1.6.3 | Introduced |
