2023-02-28 15:22:46 -05:00
|
|
|
---
|
2023-03-11 09:57:24 -05:00
|
|
|
title: Mengunggah Gambar
|
2023-02-28 15:22:46 -05:00
|
|
|
---
|
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
Berikut ini adalah beberapa aturan umum untuk berkontribusi pada Privacy Guides:
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
## Gambar
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
- Kami **lebih suka** gambar SVG, tetapi jika tidak ada, kami dapat menggunakan gambar PNG
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
Logo perusahaan memiliki ukuran kanvas:
|
2023-02-28 15:22:46 -05:00
|
|
|
|
|
|
|
- 128x128px
|
|
|
|
- 384x128px
|
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
## Optimasi
|
2023-02-28 15:22:46 -05:00
|
|
|
|
|
|
|
### PNG
|
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
Gunakan [OptiPNG](https://sourceforge.net/projects/optipng/) untuk mengoptimalkan gambar PNG:
|
2023-02-28 15:22:46 -05:00
|
|
|
|
|
|
|
```bash
|
|
|
|
optipng -o7 file.png
|
|
|
|
```
|
|
|
|
|
|
|
|
### SVG
|
|
|
|
|
|
|
|
#### Inkscape
|
|
|
|
|
|
|
|
[Scour](https://github.com/scour-project/scour) all SVG images.
|
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
Dalam Inkscape:
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
1. Simpan Berkas Sebagai..
|
2023-02-28 15:22:46 -05:00
|
|
|
2. Set type to Optimized SVG (*.svg)
|
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
Pada tab **Opsi**:
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
- **Jumlah digit signifikan untuk koordinat** > **5**
|
|
|
|
- [x] Aktifkan **Persingkat nilai warna**
|
|
|
|
- [x] Aktifkan **Konversi atribut CSS ke atribut XML**
|
|
|
|
- [x] Aktifkan **Runtuhkan grup**
|
|
|
|
- [x] Aktifkan **Buat grup untuk atribut serupa**
|
|
|
|
- [ ] Matikan **Simpan data editor**
|
|
|
|
- [ ] Matikan **Simpan definisi yang tidak direferensikan**
|
|
|
|
- [x] Hidupkan **Bekerja di sekitar bug renderer**
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
Pada tab **SVG Output** di bawah **Opsi dokumen**:
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
- [ ] Matikan **Hapus deklarasi XML**
|
|
|
|
- [x] Aktifkan **Hapus metadata**
|
|
|
|
- [x] Aktifkan **Hapus komentar**
|
|
|
|
- [x] Aktifkan **Gambar raster yang disematkan**
|
|
|
|
- [x] Aktifkan **Aktifkan viewboxing**
|
2023-02-28 15:22:46 -05:00
|
|
|
|
|
|
|
In the **SVG Output** under **Pretty-printing**:
|
|
|
|
|
|
|
|
- [ ] Turn off **Format output with line-breaks and indentation**
|
|
|
|
- **Indentation characters** > Select **Space**
|
2023-03-11 09:57:24 -05:00
|
|
|
- **Kedalaman lekukan** > **1**
|
2023-02-28 15:22:46 -05:00
|
|
|
- [ ] Turn off **Strip the "xml:space" attribute from the root SVG element**
|
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
Pada tab **IDs**:
|
2023-02-28 15:22:46 -05:00
|
|
|
|
2023-03-11 09:57:24 -05:00
|
|
|
- [x] Aktifkan **Hapus ID yang tidak digunakan**
|
|
|
|
- [] Nonaktifkan **Persingkat ID**
|
|
|
|
- **Awalan ID singkat dengan** > `biarkan kosong`
|
2023-02-28 15:22:46 -05:00
|
|
|
- [x] Turn on **Preserve manually created IDs not ending with digits**
|
|
|
|
- **Preserve the following IDs** > `leave blank`
|
|
|
|
- **Preserve IDs starting with** > `leave blank`
|
|
|
|
|
|
|
|
#### CLI
|
|
|
|
|
|
|
|
The same can be achieved with the [Scour](https://github.com/scour-project/scour) command:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
scour --set-precision=5 \
|
|
|
|
--create-groups \
|
|
|
|
--renderer-workaround \
|
|
|
|
--remove-descriptive-elements \
|
|
|
|
--enable-comment-stripping \
|
|
|
|
--enable-viewboxing \
|
|
|
|
--indent=space \
|
|
|
|
--nindent=1 \
|
|
|
|
--no-line-breaks \
|
|
|
|
--enable-id-stripping \
|
|
|
|
--protect-ids-noninkscape \
|
|
|
|
input.svg output.svg
|
|
|
|
```
|