# 概念与技巧

## 压缩至最小策略：

`JPG`格式为存储空间最小，也支持非常广。可以将`PNG`、`TIFF`格式先转换为`JPG`格式图片，再进行压缩，实现最优存储。

## 格式空间大小对比：

在PNG、JPG、TIFF、HEIC四种格式中。您必须了解以下的基本概念。以下表格为同一张原图数据：

|  格式  | 支持透明（Alpha） | 相同原图大小 |   压缩后  |  适用 |
| :--: | :---------: | :----: | :----: | :-: |
|  PNG |      是      | 1.3 MB | 332 KB |  设计 |
|  JPG |      否      | 143 KB | 109 KB |  网站 |
| TIFF |      是      | 1.2 MB | 340 KB |  设计 |
| HEIC |      否      |  74 KB |   已最低  |  苹果 |

## 相同图片空间大小，格式转换的时候应该注意：

**`PNG ≈ TIFF > JPG > HEIC`**

## 图片首次压缩能到60%-80%，再次、三次压缩变化小，为什么？

软件压缩策略是：“保证肉眼识别不出变化，尽可能最大限度的压缩”。出现再次压缩基本没变化，那么说明这张图已经压缩到极限了。

## 我需要将图片压缩到最小，如何操作？分两种情况

1. 原图为JPG图片，那么直接拖拽到uPic压缩即可。
2. 原图为PNG、TIFF等格式，那么可将图片转换为JPG，再进行压缩。

## 相同图片不同格式，存储空间大小是怎么样的？

作者经过大量图片对比，得出如下结论：相同图片空间大小占用情况：**`PNG ≈ TIFF > JPG > HEIC`**

请根据提取需求选择合适的格式进行转换。

## 选择哪种图片格式最好？

这根据具体需求具体分析，如果需要透明通道的（alph）那么就PNG，如果都是无透明的，那么JPG空间占用更小，当然最好的。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://upic.iluoxiao.com/base.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
