@jjlmoya/utils-converters 1.24.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/category/i18n/de.ts +1 -1
- package/src/category/i18n/en.ts +1 -1
- package/src/category/i18n/fr.ts +1 -1
- package/src/category/i18n/id.ts +1 -1
- package/src/category/i18n/it.ts +1 -1
- package/src/category/i18n/nl.ts +1 -1
- package/src/category/i18n/pl.ts +1 -1
- package/src/category/i18n/pt.ts +1 -1
- package/src/category/i18n/sv.ts +1 -1
- package/src/entries.ts +6 -0
- package/src/tests/bibliography_wellformed_export.test.ts +46 -0
- package/src/tests/category_seo_quality.test.ts +74 -0
- package/src/tests/faq_count.test.ts +1 -1
- package/src/tests/no_h1_in_components.test.ts +1 -1
- package/src/tests/seo_parity.test.ts +2 -2
- package/src/tests/seo_wellformed_export.test.ts +65 -0
- package/src/tests/tool_validation.test.ts +15 -15
- package/src/tool/avifAJpg/i18n/en.ts +164 -164
- package/src/tool/avifAJpg/i18n/es.ts +164 -164
- package/src/tool/avifAJpg/i18n/fr.ts +164 -164
- package/src/tool/avifAJpg/i18n/ja.ts +166 -166
- package/src/tool/avifAJpg/i18n/ko.ts +166 -166
- package/src/tool/avifAJpg/i18n/zh.ts +166 -166
- package/src/tool/avifAJpg/seo.astro +15 -15
- package/src/tool/avifAPng/i18n/en.ts +164 -164
- package/src/tool/avifAPng/i18n/es.ts +164 -164
- package/src/tool/avifAPng/i18n/fr.ts +164 -164
- package/src/tool/avifAPng/i18n/ja.ts +166 -166
- package/src/tool/avifAPng/i18n/ko.ts +166 -166
- package/src/tool/avifAPng/i18n/zh.ts +166 -166
- package/src/tool/avifAPng/seo.astro +15 -15
- package/src/tool/avifAWebp/i18n/en.ts +164 -164
- package/src/tool/avifAWebp/i18n/es.ts +164 -164
- package/src/tool/avifAWebp/i18n/fr.ts +164 -164
- package/src/tool/avifAWebp/i18n/ja.ts +166 -166
- package/src/tool/avifAWebp/i18n/ko.ts +166 -166
- package/src/tool/avifAWebp/i18n/zh.ts +166 -166
- package/src/tool/avifAWebp/seo.astro +15 -15
- package/src/tool/bmpAJpg/i18n/en.ts +164 -164
- package/src/tool/bmpAJpg/i18n/es.ts +164 -164
- package/src/tool/bmpAJpg/i18n/fr.ts +164 -164
- package/src/tool/bmpAJpg/i18n/ja.ts +166 -166
- package/src/tool/bmpAJpg/i18n/ko.ts +166 -166
- package/src/tool/bmpAJpg/i18n/zh.ts +166 -166
- package/src/tool/bmpAJpg/seo.astro +15 -15
- package/src/tool/bmpAPng/i18n/en.ts +164 -164
- package/src/tool/bmpAPng/i18n/es.ts +164 -164
- package/src/tool/bmpAPng/i18n/fr.ts +164 -164
- package/src/tool/bmpAPng/i18n/ja.ts +165 -165
- package/src/tool/bmpAPng/i18n/ko.ts +165 -165
- package/src/tool/bmpAPng/i18n/zh.ts +165 -165
- package/src/tool/bmpAPng/seo.astro +15 -15
- package/src/tool/bmpAWebp/i18n/en.ts +164 -164
- package/src/tool/bmpAWebp/i18n/es.ts +164 -164
- package/src/tool/bmpAWebp/i18n/fr.ts +164 -164
- package/src/tool/bmpAWebp/i18n/ja.ts +166 -166
- package/src/tool/bmpAWebp/i18n/ko.ts +166 -166
- package/src/tool/bmpAWebp/i18n/zh.ts +166 -166
- package/src/tool/bmpAWebp/seo.astro +15 -15
- package/src/tool/gifAJpg/i18n/en.ts +164 -164
- package/src/tool/gifAJpg/i18n/es.ts +164 -164
- package/src/tool/gifAJpg/i18n/fr.ts +164 -164
- package/src/tool/gifAJpg/i18n/ja.ts +166 -166
- package/src/tool/gifAJpg/i18n/ko.ts +166 -166
- package/src/tool/gifAJpg/i18n/zh.ts +166 -166
- package/src/tool/gifAJpg/seo.astro +15 -15
- package/src/tool/gifAPng/i18n/en.ts +164 -164
- package/src/tool/gifAPng/i18n/es.ts +164 -164
- package/src/tool/gifAPng/i18n/fr.ts +164 -164
- package/src/tool/gifAPng/i18n/ja.ts +166 -166
- package/src/tool/gifAPng/i18n/ko.ts +166 -166
- package/src/tool/gifAPng/i18n/zh.ts +166 -166
- package/src/tool/gifAPng/seo.astro +15 -15
- package/src/tool/gifAWebp/i18n/en.ts +164 -164
- package/src/tool/gifAWebp/i18n/es.ts +164 -164
- package/src/tool/gifAWebp/i18n/fr.ts +164 -164
- package/src/tool/gifAWebp/i18n/ja.ts +166 -166
- package/src/tool/gifAWebp/i18n/ko.ts +166 -166
- package/src/tool/gifAWebp/i18n/zh.ts +166 -166
- package/src/tool/gifAWebp/seo.astro +15 -15
- package/src/tool/imagenBase64/i18n/en.ts +154 -154
- package/src/tool/imagenBase64/i18n/es.ts +154 -154
- package/src/tool/imagenBase64/i18n/fr.ts +154 -154
- package/src/tool/imagenBase64/seo.astro +15 -15
- package/src/tool/jpgAIco/seo.astro +15 -15
- package/src/tool/jpgAPng/i18n/en.ts +164 -164
- package/src/tool/jpgAPng/i18n/es.ts +164 -164
- package/src/tool/jpgAPng/i18n/fr.ts +164 -164
- package/src/tool/jpgAPng/i18n/ja.ts +166 -166
- package/src/tool/jpgAPng/i18n/ko.ts +166 -166
- package/src/tool/jpgAPng/i18n/zh.ts +166 -166
- package/src/tool/jpgAPng/seo.astro +15 -15
- package/src/tool/jpgAWebp/i18n/en.ts +164 -164
- package/src/tool/jpgAWebp/i18n/es.ts +164 -164
- package/src/tool/jpgAWebp/i18n/fr.ts +164 -164
- package/src/tool/jpgAWebp/seo.astro +15 -15
- package/src/tool/pngAIco/seo.astro +15 -15
- package/src/tool/pngAJpg/i18n/de.ts +21 -21
- package/src/tool/pngAJpg/i18n/es.ts +177 -177
- package/src/tool/pngAJpg/i18n/fr.ts +137 -137
- package/src/tool/pngAJpg/i18n/id.ts +89 -89
- package/src/tool/pngAJpg/i18n/it.ts +89 -89
- package/src/tool/pngAJpg/i18n/ko.ts +177 -177
- package/src/tool/pngAJpg/i18n/nl.ts +20 -20
- package/src/tool/pngAJpg/i18n/pl.ts +89 -89
- package/src/tool/pngAJpg/i18n/pt.ts +89 -89
- package/src/tool/pngAJpg/i18n/ru.ts +177 -177
- package/src/tool/pngAJpg/i18n/sv.ts +89 -89
- package/src/tool/pngAJpg/i18n/tr.ts +89 -89
- package/src/tool/pngAJpg/seo.astro +15 -15
- package/src/tool/pngAWebp/i18n/en.ts +164 -164
- package/src/tool/pngAWebp/i18n/es.ts +164 -164
- package/src/tool/pngAWebp/i18n/fr.ts +164 -164
- package/src/tool/pngAWebp/seo.astro +15 -15
- package/src/tool/svgAJpg/i18n/fr.ts +164 -164
- package/src/tool/svgAJpg/seo.astro +15 -15
- package/src/tool/svgAPng/i18n/fr.ts +164 -164
- package/src/tool/svgAPng/seo.astro +15 -15
- package/src/tool/webpAIco/seo.astro +15 -15
- package/src/tool/webpAJpg/seo.astro +15 -15
- package/src/tool/webpAPng/bibliography.ts +13 -13
- package/src/tool/webpAPng/i18n/de.ts +166 -166
- package/src/tool/webpAPng/i18n/es.ts +171 -171
- package/src/tool/webpAPng/i18n/fr.ts +166 -166
- package/src/tool/webpAPng/i18n/id.ts +166 -166
- package/src/tool/webpAPng/i18n/it.ts +166 -166
- package/src/tool/webpAPng/i18n/nl.ts +166 -166
- package/src/tool/webpAPng/i18n/pl.ts +166 -166
- package/src/tool/webpAPng/i18n/pt.ts +166 -166
- package/src/tool/webpAPng/i18n/ru.ts +166 -166
- package/src/tool/webpAPng/i18n/sv.ts +166 -166
- package/src/tool/webpAPng/i18n/tr.ts +167 -167
- package/src/tool/webpAPng/seo.astro +15 -15
|
@@ -1,168 +1,168 @@
|
|
|
1
1
|
import { bibliography } from '../bibliography';
|
|
2
|
-
import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
|
|
3
|
-
import { generateSchemas } from '../../../shared/logic/schemas';
|
|
4
|
-
import type { GifAPngLocaleContent } from '../index';
|
|
5
|
-
|
|
6
|
-
const slug = 'gif-to-png-converter';
|
|
7
|
-
const title = '在线将 GIF 转换为 PNG';
|
|
8
|
-
const description =
|
|
9
|
-
'从 GIF 中提取第一帧并将其转换为 PNG,同时保留透明度。无需服务器。本地处理。免费。';
|
|
10
|
-
|
|
11
|
-
const ui: ImageConverterUI = {
|
|
12
|
-
dragText: '拖拽 GIF 文件...',
|
|
13
|
-
convertText: '立即将其转换为 PNG',
|
|
14
|
-
selectFiles: '选择文件',
|
|
15
|
-
processedFiles: '已处理文件',
|
|
16
|
-
downloadAll: '下载全部 (.zip)',
|
|
2
|
+
import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
|
|
3
|
+
import { generateSchemas } from '../../../shared/logic/schemas';
|
|
4
|
+
import type { GifAPngLocaleContent } from '../index';
|
|
5
|
+
|
|
6
|
+
const slug = 'gif-to-png-converter';
|
|
7
|
+
const title = '在线将 GIF 转换为 PNG';
|
|
8
|
+
const description =
|
|
9
|
+
'从 GIF 中提取第一帧并将其转换为 PNG,同时保留透明度。无需服务器。本地处理。免费。';
|
|
10
|
+
|
|
11
|
+
const ui: ImageConverterUI = {
|
|
12
|
+
dragText: '拖拽 GIF 文件...',
|
|
13
|
+
convertText: '立即将其转换为 PNG',
|
|
14
|
+
selectFiles: '选择文件',
|
|
15
|
+
processedFiles: '已处理文件',
|
|
16
|
+
downloadAll: '下载全部 (.zip)',
|
|
17
17
|
pending: '等待中',
|
|
18
|
-
bibliographyTitle: '参考文献',
|
|
19
|
-
faqTitle: '常见问题',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const faq: GifAPngLocaleContent['faq'] = [
|
|
23
|
-
{
|
|
24
|
-
question: '为什么将 GIF 这种动画格式转换为 PNG 这种静态格式?',
|
|
25
|
-
answer:
|
|
26
|
-
'许多社交网络或头像不支持会动的图片。将复杂 GIF 的第一帧提取到高质量的 PNG 中可以解决这些障碍,并减少不必要的文件体积。',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
question: '旧 GIF 的透明度会在生成的 PNG 中保留吗?',
|
|
30
|
-
answer:
|
|
31
|
-
'是的,与 JPG 不同,PNG 格式保留 Alpha 通道。如果 GIF 有透明背景,PNG 将保留它并保持边缘清晰。',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
question: '处理后,我的图片会在服务器上保留一段时间吗?',
|
|
35
|
-
answer:
|
|
36
|
-
'没有任何服务器会保留您的 GIF;由于 Web Canvas API 的作用,所有提取均在本地完成。是您电脑的处理器在没有任何网络接触的情况下安全地解码您的文件。',
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
|
|
40
|
-
const howTo: GifAPngLocaleContent['howTo'] = [
|
|
41
|
-
{
|
|
42
|
-
name: '提供动画',
|
|
43
|
-
text: '将笨重的 GIF 文件拖入输入框。',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: '完美的提取照片',
|
|
47
|
-
text: '系统将精准锁定动作源头,在毫秒内产出完美无瑕的拷贝。',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: '保存您的静态图',
|
|
51
|
-
text: '将所有转换为 PNG 的静态 GIF 头像批量保存到 ZIP 中。',
|
|
52
|
-
},
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
const seo: GifAPngLocaleContent['seo'] = [
|
|
56
|
-
{
|
|
57
|
-
type: 'title',
|
|
58
|
-
text: 'GIF 转 PNG 转换器:克服 GIF 的颜色和透明度限制',
|
|
59
|
-
level: 2,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
type: 'paragraph',
|
|
63
|
-
html: 'GIF 设计于显示器几乎只能显示 256 色的年代。几十年后,这一限制仍然是它最大的弱点。PNG 的诞生正是为了在所有重视质量和透明度的用例中取代 GIF:Logo、图标、界面图形以及任何在任何背景色上都必须看起来完美的透明背景图像。',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
type: 'title',
|
|
67
|
-
text: 'GIF vs PNG:1600 万色的革命',
|
|
68
|
-
level: 3,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: 'paragraph',
|
|
72
|
-
html: 'GIF 和 PNG 之间最关键的区别不仅仅是颜色的数量。GIF 支持二进制透明:每个像素要么不透明,要么完全透明,没有灰度等级。而 PNG 支持完整的 Alpha 通道,每个像素具有 256 个不透明度级别。这意味着 PNG 中的 Logo 边缘可以被完美平滑,而 GIF 在彩色背景上展现出特征性的锯齿。',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
type: 'paragraph',
|
|
76
|
-
html: '除了卓越的透明度外,PNG 还消除了 GIF 的 256 色限制。屏幕截图、带有渐变的插图、带有阴影的 Logo:所有这些在 PNG 中看起来都明显更好。而且由于是无损压缩,每个像素都精确保留了原始值,没有 JPG 转换会引入的伪影。',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
type: 'title',
|
|
80
|
-
text: '架构对比:本地 vs 云端',
|
|
81
|
-
level: 3,
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: 'comparative',
|
|
85
|
-
items: [
|
|
86
|
-
{
|
|
87
|
-
title: '云端转换器',
|
|
88
|
-
description: '在远程服务器上处理您图片的工具。',
|
|
89
|
-
icon: 'mdi:cloud-upload',
|
|
90
|
-
pointIcon: 'mdi:close-circle-outline',
|
|
91
|
-
points: [
|
|
92
|
-
'您的 Logo 和图标通过互联网传输',
|
|
93
|
-
'由于网络延迟导致的等待时间',
|
|
94
|
-
'文件体积和数量限制',
|
|
95
|
-
'您的图片可能会留在第三方缓存中',
|
|
96
|
-
],
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
title: '我们的本地架构',
|
|
100
|
-
description: '通过 Vanilla JS 技术在您的硬件上直接处理。',
|
|
101
|
-
icon: 'mdi:laptop-mac',
|
|
102
|
-
highlight: true,
|
|
103
|
-
points: [
|
|
104
|
-
'GIF 绝不离开您的设备',
|
|
105
|
-
'无需网络,实现即时转换',
|
|
106
|
-
'没有文件体积或数量限制',
|
|
107
|
-
'绝对隐私:0 字节向外传输',
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
type: 'title',
|
|
114
|
-
text: '本地 GIF 转 PNG 的技术原理',
|
|
115
|
-
level: 3,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: 'paragraph',
|
|
119
|
-
html: '转换使用了浏览器的 Canvas API。GIF 在内存中被解码为原生 Image 元素。通过在 HTML5 画布(canvas)上渲染,浏览器的图形引擎会捕捉第一帧,且保留其原始透明度信息完好无损。',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
type: 'paragraph',
|
|
123
|
-
html: '与转换为 JPG 不同,使用 PNG 无需添加白色背景。原 GIF 的 Alpha 通道直接保留在导出的 PNG 中。画布的 <code>toDataURL(\'image/png\')</code> 方法直接在您电脑的 RAM 中生成 PNG 字节流,无需任何网络传输,生成的文件会立即下载。',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
type: 'tip',
|
|
127
|
-
title: 'GIF 的二进制透明 vs PNG 的 Alpha 通道',
|
|
128
|
-
html: 'GIF 仅支持二进制透明(全透明或不透明)。转换为 PNG 时,GIF 的半透明像素将保持浏览器解释的样子。如果您的 GIF 有锯齿状边缘,PNG 会保留它们-但您可以在任何编辑器中通过平滑边缘来修复它们,这在原 GIF 中是不可能实现的。',
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
type: 'title',
|
|
132
|
-
text: '生成 PNG 的应用场景与兼容性',
|
|
133
|
-
level: 3,
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
type: 'list',
|
|
137
|
-
icon: 'mdi:check-circle',
|
|
138
|
-
items: [
|
|
139
|
-
'可在任何背景色上使用的 Logo 和图标。',
|
|
140
|
-
'用于 Discord、Telegram、Slack 和游戏平台的个人头像。',
|
|
141
|
-
'网页和移动应用的界面图形。',
|
|
142
|
-
'带有透明背景的个性化贴纸和表情。',
|
|
143
|
-
'用于技术文档的屏幕截图和 UI 元素。',
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
type: 'title',
|
|
148
|
-
text: '结论:PNG 是 GIF 一直想成为的样子',
|
|
149
|
-
level: 3,
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
type: 'paragraph',
|
|
153
|
-
html: '将 GIF 转换为 PNG 不仅仅是更改格式:它是将图像更新为 GIF 永远无法达到的现代标准。更多色彩,更好的透明度,更小的体积。我们的工具在毫秒内直接在您的浏览器中完成此项转换,不向外发送任何数据。',
|
|
154
|
-
},
|
|
155
|
-
];
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
export const content: GifAPngLocaleContent = {
|
|
159
|
-
slug,
|
|
160
|
-
title,
|
|
161
|
-
description,
|
|
162
|
-
ui,
|
|
163
|
-
seo,
|
|
164
|
-
faq,
|
|
165
|
-
bibliography,
|
|
166
|
-
howTo,
|
|
167
|
-
schemas: generateSchemas({ title, description, inLanguage: 'zh', faq, howTo }),
|
|
168
|
-
};
|
|
18
|
+
bibliographyTitle: '参考文献',
|
|
19
|
+
faqTitle: '常见问题',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const faq: GifAPngLocaleContent['faq'] = [
|
|
23
|
+
{
|
|
24
|
+
question: '为什么将 GIF 这种动画格式转换为 PNG 这种静态格式?',
|
|
25
|
+
answer:
|
|
26
|
+
'许多社交网络或头像不支持会动的图片。将复杂 GIF 的第一帧提取到高质量的 PNG 中可以解决这些障碍,并减少不必要的文件体积。',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
question: '旧 GIF 的透明度会在生成的 PNG 中保留吗?',
|
|
30
|
+
answer:
|
|
31
|
+
'是的,与 JPG 不同,PNG 格式保留 Alpha 通道。如果 GIF 有透明背景,PNG 将保留它并保持边缘清晰。',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
question: '处理后,我的图片会在服务器上保留一段时间吗?',
|
|
35
|
+
answer:
|
|
36
|
+
'没有任何服务器会保留您的 GIF;由于 Web Canvas API 的作用,所有提取均在本地完成。是您电脑的处理器在没有任何网络接触的情况下安全地解码您的文件。',
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const howTo: GifAPngLocaleContent['howTo'] = [
|
|
41
|
+
{
|
|
42
|
+
name: '提供动画',
|
|
43
|
+
text: '将笨重的 GIF 文件拖入输入框。',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: '完美的提取照片',
|
|
47
|
+
text: '系统将精准锁定动作源头,在毫秒内产出完美无瑕的拷贝。',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: '保存您的静态图',
|
|
51
|
+
text: '将所有转换为 PNG 的静态 GIF 头像批量保存到 ZIP 中。',
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
const seo: GifAPngLocaleContent['seo'] = [
|
|
56
|
+
{
|
|
57
|
+
type: 'title',
|
|
58
|
+
text: 'GIF 转 PNG 转换器:克服 GIF 的颜色和透明度限制',
|
|
59
|
+
level: 2,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'paragraph',
|
|
63
|
+
html: 'GIF 设计于显示器几乎只能显示 256 色的年代。几十年后,这一限制仍然是它最大的弱点。PNG 的诞生正是为了在所有重视质量和透明度的用例中取代 GIF:Logo、图标、界面图形以及任何在任何背景色上都必须看起来完美的透明背景图像。',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'title',
|
|
67
|
+
text: 'GIF vs PNG:1600 万色的革命',
|
|
68
|
+
level: 3,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'paragraph',
|
|
72
|
+
html: 'GIF 和 PNG 之间最关键的区别不仅仅是颜色的数量。GIF 支持二进制透明:每个像素要么不透明,要么完全透明,没有灰度等级。而 PNG 支持完整的 Alpha 通道,每个像素具有 256 个不透明度级别。这意味着 PNG 中的 Logo 边缘可以被完美平滑,而 GIF 在彩色背景上展现出特征性的锯齿。',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'paragraph',
|
|
76
|
+
html: '除了卓越的透明度外,PNG 还消除了 GIF 的 256 色限制。屏幕截图、带有渐变的插图、带有阴影的 Logo:所有这些在 PNG 中看起来都明显更好。而且由于是无损压缩,每个像素都精确保留了原始值,没有 JPG 转换会引入的伪影。',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'title',
|
|
80
|
+
text: '架构对比:本地 vs 云端',
|
|
81
|
+
level: 3,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'comparative',
|
|
85
|
+
items: [
|
|
86
|
+
{
|
|
87
|
+
title: '云端转换器',
|
|
88
|
+
description: '在远程服务器上处理您图片的工具。',
|
|
89
|
+
icon: 'mdi:cloud-upload',
|
|
90
|
+
pointIcon: 'mdi:close-circle-outline',
|
|
91
|
+
points: [
|
|
92
|
+
'您的 Logo 和图标通过互联网传输',
|
|
93
|
+
'由于网络延迟导致的等待时间',
|
|
94
|
+
'文件体积和数量限制',
|
|
95
|
+
'您的图片可能会留在第三方缓存中',
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: '我们的本地架构',
|
|
100
|
+
description: '通过 Vanilla JS 技术在您的硬件上直接处理。',
|
|
101
|
+
icon: 'mdi:laptop-mac',
|
|
102
|
+
highlight: true,
|
|
103
|
+
points: [
|
|
104
|
+
'GIF 绝不离开您的设备',
|
|
105
|
+
'无需网络,实现即时转换',
|
|
106
|
+
'没有文件体积或数量限制',
|
|
107
|
+
'绝对隐私:0 字节向外传输',
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'title',
|
|
114
|
+
text: '本地 GIF 转 PNG 的技术原理',
|
|
115
|
+
level: 3,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: 'paragraph',
|
|
119
|
+
html: '转换使用了浏览器的 Canvas API。GIF 在内存中被解码为原生 Image 元素。通过在 HTML5 画布(canvas)上渲染,浏览器的图形引擎会捕捉第一帧,且保留其原始透明度信息完好无损。',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'paragraph',
|
|
123
|
+
html: '与转换为 JPG 不同,使用 PNG 无需添加白色背景。原 GIF 的 Alpha 通道直接保留在导出的 PNG 中。画布的 <code>toDataURL(\'image/png\')</code> 方法直接在您电脑的 RAM 中生成 PNG 字节流,无需任何网络传输,生成的文件会立即下载。',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: 'tip',
|
|
127
|
+
title: 'GIF 的二进制透明 vs PNG 的 Alpha 通道',
|
|
128
|
+
html: 'GIF 仅支持二进制透明(全透明或不透明)。转换为 PNG 时,GIF 的半透明像素将保持浏览器解释的样子。如果您的 GIF 有锯齿状边缘,PNG 会保留它们-但您可以在任何编辑器中通过平滑边缘来修复它们,这在原 GIF 中是不可能实现的。',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
type: 'title',
|
|
132
|
+
text: '生成 PNG 的应用场景与兼容性',
|
|
133
|
+
level: 3,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: 'list',
|
|
137
|
+
icon: 'mdi:check-circle',
|
|
138
|
+
items: [
|
|
139
|
+
'可在任何背景色上使用的 Logo 和图标。',
|
|
140
|
+
'用于 Discord、Telegram、Slack 和游戏平台的个人头像。',
|
|
141
|
+
'网页和移动应用的界面图形。',
|
|
142
|
+
'带有透明背景的个性化贴纸和表情。',
|
|
143
|
+
'用于技术文档的屏幕截图和 UI 元素。',
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'title',
|
|
148
|
+
text: '结论:PNG 是 GIF 一直想成为的样子',
|
|
149
|
+
level: 3,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'paragraph',
|
|
153
|
+
html: '将 GIF 转换为 PNG 不仅仅是更改格式:它是将图像更新为 GIF 永远无法达到的现代标准。更多色彩,更好的透明度,更小的体积。我们的工具在毫秒内直接在您的浏览器中完成此项转换,不向外发送任何数据。',
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
export const content: GifAPngLocaleContent = {
|
|
159
|
+
slug,
|
|
160
|
+
title,
|
|
161
|
+
description,
|
|
162
|
+
ui,
|
|
163
|
+
seo,
|
|
164
|
+
faq,
|
|
165
|
+
bibliography,
|
|
166
|
+
howTo,
|
|
167
|
+
schemas: generateSchemas({ title, description, inLanguage: 'zh', faq, howTo }),
|
|
168
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
-
import { gifAPng } from './index';
|
|
4
|
-
import type { KnownLocale } from '../../types';
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
locale?: KnownLocale;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { locale = 'es' } = Astro.props;
|
|
11
|
-
const content = await gifAPng.i18n[locale]?.();
|
|
12
|
-
if (!content) return null;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { gifAPng } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await gifAPng.i18n[locale]?.();
|
|
12
|
+
if (!content) return null;
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|