# Image viewer

> The full-screen view of a picture from a chat: zoom, flip through the chat's pictures, rotate, copy, save, share, draw on it and send it back.

Source: https://air.build/docs/screens/chat/image-viewer/

The image viewer shows one picture from a chat full screen. From it you can flip to the chat's other pictures, rotate, copy, save or share the picture, open the chat's **Photos** grid, and draw on the picture and send it back into the chat with a message.

## Open it

The picture grows out of the spot you tapped and flies back there when you close it.

| From | How | What the viewer has |
| --- | --- | --- |
| A picture in a message | Tap or click the picture. Before it has loaded (a round progress disc fills on it), the tap does nothing; if it failed to load (a red dot with an exclamation mark stands on it), the tap tries to load it again. | Everything on this page. The **Photos** button and the reply bar show only where the chat has them (not in a thread, for example). |
| A picture on a card | Tap or click the card's picture. | Rotate, copy, save, share and close. No flipping, no **Photos** button, no reply bar. |
| A picture staged in the message composer (iPhone and iPad only) | Tap the picture's chip above the message field. | Rotate, copy, save, share, close and the pen. Drawing changes the picture in your draft; nothing is sent from the viewer. See [Mark up a staged picture](https://air.build/docs/screens/chat/image-viewer/#mark-up-a-staged-picture). |
| A tile in [Photos](https://air.build/docs/screens/chat/photos/) | Tap or click a tile. | Everything, and flipping goes through every picture and video in the grid. |

Only one viewer is open at a time.

## What's on it

**iPhone**

The picture sits framed in the middle on the system background, with round buttons along the top and the reply bar along the bottom.

| Control | Where | What it does |
| --- | --- | --- |
| **Close** (✕) | Top left | Closes the viewer. |
| **Photos** (grid) | Next to ✕ | Opens [Photos](https://air.build/docs/screens/chat/photos/), every picture and video in the chat. When you opened this viewer from Photos, it takes you back there. Shows only in a chat that has a Photos grid. Hidden while you draw. |
| **Rotate** | Top right, first | Turns the picture a quarter turn to the left. Each tap turns it again. Hidden when there isn't room for it, for example in a narrow iPad window. |
| **Copy** | Top right | Copies the picture itself (not a link) so you can paste it in another app. The button turns into a checkmark for a second when it's done. |
| Save | Top right | Saves to your Photos. With one picture in the message it saves at once. When the message has more than one, it asks: **Save Photo** (the one on screen), **Save All Photos** (every picture in that message) or **Cancel**. The button turns into a checkmark for a second when the save worked. The first time, iOS asks for permission to add to Photos. |
| Share | Top right corner | Opens the share sheet with the picture as a file under its own name. |
| **Draw** (pen) | Bottom left | Starts drawing on the picture. See [Draw on a picture and send it back](https://air.build/docs/screens/chat/image-viewer/#draw-on-a-picture-and-send-it-back). |
| **Add a message…** | Bottom | Words to send back with the picture. **Send** (↑) appears in the field once there are words or a drawing. |
| **Play** | Middle of a video | Only when the page is a video (from Photos). Opens the [video player](https://air.build/docs/screens/chat/video-player/). On a video's page, Rotate, Copy, Save, Share and the reply bar are hidden. |

The bottom bar shows only where you can reply in the chat. It sits above the keyboard while you type. On iPad it's held to a readable width.

**Mac**

The viewer covers the whole window, title bar included, on black. Buttons sit in glass capsules in the top-right corner; the pen and the reply field sit at the bottom.

| Control | Where | What it does |
| --- | --- | --- |
| Previous / Next (‹ ›) | Top right, left of the main capsule | Shows the previous or next picture in the chat. Shows only when there's more than one. An arrow is dimmed at the start or end. |
| **Photos** (grid) | Main capsule, first | Opens [Photos](https://air.build/docs/screens/chat/photos/). From Photos, it takes you back there. Shows only in a chat that has a Photos grid. |
| **Rotate** | Main capsule | Turns the picture a quarter turn to the left. Hold Option while clicking to turn it to the right. |
| **Copy** | Main capsule | Copies the picture itself. Turns into a checkmark for a second when done. |
| Save | Main capsule | With one picture in the message, opens a save dialog named for the picture, starting in Downloads. With more than one, a menu offers **Save Image…** (a save dialog) and **Save All Images…** (pick a folder, then **Save**; every picture in that message goes there). A file with the same name is never replaced: the new one is numbered ("cat 2.png"). Turns into a checkmark for a second when the save worked. |
| Share | Main capsule | Opens the Mac's share menu with the picture as a file. |
| **Close** (✕) | Main capsule, corner | Closes the viewer. |
| **Markup** (pen) | Bottom, left of the field | Starts drawing. Your drawing stays on the picture until you send it, close the viewer or move to another picture. |
| **Add a message…** | Bottom | Words to send back with the picture. Click **Send** (↑); Return in the field presses **Send** too. **Send** is dimmed until there are words or a drawing. |
| **Play** | Middle of a video | Only when the page is a video (from Photos). Opens the [video player](https://air.build/docs/screens/chat/video-player/). Rotate, Copy, Save and Share are dimmed there, and the pen and the field are hidden. |

The pen and the field show only where you can reply in the chat.

### Gestures and clicks

**iPhone**

| Gesture | What it does |
| --- | --- |
| Tap the picture | Hides the buttons: the picture fills the screen on black. Tap again to bring them back. While you type, a tap only puts the keyboard away. |
| Tap around the picture | Closes the viewer. |
| Double-tap | Zooms in where you tapped. Double-tap again to zoom back out. |
| Pinch | Zooms, up to three times. Zooming in hides the buttons. |
| Drag up or down | Pulls the picture away; let go far enough to close, or it springs back. Doesn't work while zoomed in (then dragging moves around the picture). |
| Swipe left or right | Next or previous picture in the chat. A picture with a drawing on it doesn't flip; it only pulls down to close. |

**Mac**

| Action | What it does |
| --- | --- |
| Click the picture | Hides the buttons. Click again to bring them back. While you type, a click only leaves the field. |
| Click the black around the picture | Closes the viewer. |
| Two-finger swipe left or right on the trackpad | Next or previous picture. |

The Mac viewer has no zoom.

### Keyboard (Mac)

- Esc closes the viewer. While you're typing in **Add a message…**, Esc only leaves the field. While you're drawing, Esc presses **Done**.
- ← and → move to the previous or next picture.
- ⌘C presses **Copy**.
- ⌘R presses **Rotate**: a quarter turn left. ⌥⌘R turns the picture a quarter turn right, as Option-clicking **Rotate** does.
- ⇧⌘A presses **Markup**, to start or stop drawing. It's also **View › Markup** in the menu bar, available while a viewer that can reply is open.
- While you're drawing, ⌘Z presses **Undo**, ⇧⌘Z presses **Redo**, Return presses **Done**, and 1, 2 and 3 press **Pen**, **Highlighter** and **Eraser**.
- In **Add a message…**, Return presses **Send**.
- On a video's page, Space or Return presses **Play**.

## Draw on a picture and send it back

The picture goes back into the chat as a new message, with your drawing on it and your words under it. Use it to point at something on a screenshot.

**iPhone**

1. Tap **Draw** (the pen) at the bottom left. The zoom goes back to normal and the drawing tools appear. A red pen is picked; the tools also have a yellow marker, a black pencil, an eraser, a lasso and a ruler. You can draw with a finger or Apple Pencil.
2. Draw. **Undo** sits at the top right while you draw.
3. Tap **Done** at the top right. Your drawing stays on the picture.
4. Optional: type in **Add a message…**.
5. Tap **Send** (↑). Return in the field presses **Send** too; on the on-screen keyboard that key reads **Send**. It does nothing until **Send** shows. The viewer closes and the picture is sent with the drawing and the words.

**Mac**

1. Click **Markup** (the pen) at the bottom. ⇧⌘A presses **Markup** too.
2. A tool bar replaces the field: **Pen**, **Highlighter**, **Eraser**, then the colors **Red**, **Yellow**, **Blue**, **Black** and **White**. Keys 1, 2 and 3 pick the pen, highlighter and eraser. Picking a color while erasing goes back to the pen.
3. Draw. **Undo** and **Redo** sit at the top right. ⌘Z presses **Undo** and ⇧⌘Z presses **Redo**; **Edit › Undo** and **Edit › Redo** in the menu bar work too.
4. Click **Done**. Esc or Return presses **Done** too. The drawing stays on the picture.
5. Optional: type in **Add a message…**.
6. Click **Send**. Return in the field presses **Send** too. The viewer closes and the picture is sent.

What's sent is the picture as it stands: if you rotated it, it's sent rotated. A picture with no drawing and no words can't be sent back.

A drawing is thrown away, without asking, when you close the viewer without sending or, on the Mac, when you flip to another picture. On iPhone and iPad a picture with a drawing on it doesn't swipe to the next one.

### Mark up a staged picture

iPhone and iPad only. When you open a picture you've added to the message composer, the bottom bar has only the pen: no field and no **Send**.

1. Tap the picture's chip above the message field.
2. Tap **Draw** and draw.
3. Tap **Done**. The viewer closes and the marked-up picture replaces the one in your draft. Nothing is sent until you send the message.

If you tap **Done** without drawing anything, the pen is just put away.

## Messages

The viewer shows no alerts of its own.

| What you see | What it means | What to do |
| --- | --- | --- |
| The Save or Copy button turns into a checkmark for a second | It worked. | Nothing. |
| Save or Copy doesn't turn into a checkmark | The picture couldn't be fetched or saved. With **Save All**, one picture that fails means no checkmark, even if others were saved. | Try again. On iPhone, check that AirBuild may add to Photos in the iOS Settings app. |
| A swipe springs back | There's no picture further that way, or the next one couldn't load. | — |
| **Save All Photos** / **Save All Images…** missing | The message has only one picture. | Save saves that picture directly. |
| The progress disc on a picture in the chat | The picture is still downloading. Tapping it does nothing yet. | Wait. |
| A red dot with an exclamation mark on a picture in the chat | The picture failed to download. | Tap the picture to try again. |

The app doesn't show an error when Share can't prepare the file; nothing opens. Try again.
