@jjlmoya/utils-converters 1.1.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.
Files changed (172) hide show
  1. package/package.json +61 -0
  2. package/src/category/i18n/en.ts +90 -0
  3. package/src/category/i18n/es.ts +90 -0
  4. package/src/category/i18n/fr.ts +90 -0
  5. package/src/category/index.ts +39 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +152 -0
  9. package/src/data.ts +34 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +39 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +148 -0
  14. package/src/pages/[locale].astro +271 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/shared/ImageConverter.astro +237 -0
  17. package/src/shared/logic/converter.ts +167 -0
  18. package/src/shared/style.css +258 -0
  19. package/src/tests/faq_count.test.ts +10 -0
  20. package/src/tests/mocks/astro_mock.js +2 -0
  21. package/src/tests/seo_length.test.ts +22 -0
  22. package/src/tests/tool_validation.test.ts +17 -0
  23. package/src/tool/avifAJpg/bibliography.astro +14 -0
  24. package/src/tool/avifAJpg/component.astro +8 -0
  25. package/src/tool/avifAJpg/i18n/en.ts +123 -0
  26. package/src/tool/avifAJpg/i18n/es.ts +123 -0
  27. package/src/tool/avifAJpg/i18n/fr.ts +118 -0
  28. package/src/tool/avifAJpg/index.ts +29 -0
  29. package/src/tool/avifAJpg/seo.astro +14 -0
  30. package/src/tool/avifAPng/bibliography.astro +14 -0
  31. package/src/tool/avifAPng/component.astro +8 -0
  32. package/src/tool/avifAPng/i18n/en.ts +118 -0
  33. package/src/tool/avifAPng/i18n/es.ts +123 -0
  34. package/src/tool/avifAPng/i18n/fr.ts +118 -0
  35. package/src/tool/avifAPng/index.ts +29 -0
  36. package/src/tool/avifAPng/seo.astro +14 -0
  37. package/src/tool/avifAWebp/bibliography.astro +14 -0
  38. package/src/tool/avifAWebp/component.astro +8 -0
  39. package/src/tool/avifAWebp/i18n/en.ts +118 -0
  40. package/src/tool/avifAWebp/i18n/es.ts +123 -0
  41. package/src/tool/avifAWebp/i18n/fr.ts +118 -0
  42. package/src/tool/avifAWebp/index.ts +29 -0
  43. package/src/tool/avifAWebp/seo.astro +14 -0
  44. package/src/tool/bmpAJpg/bibliography.astro +14 -0
  45. package/src/tool/bmpAJpg/component.astro +8 -0
  46. package/src/tool/bmpAJpg/i18n/en.ts +123 -0
  47. package/src/tool/bmpAJpg/i18n/es.ts +123 -0
  48. package/src/tool/bmpAJpg/i18n/fr.ts +118 -0
  49. package/src/tool/bmpAJpg/index.ts +29 -0
  50. package/src/tool/bmpAJpg/seo.astro +14 -0
  51. package/src/tool/bmpAPng/bibliography.astro +14 -0
  52. package/src/tool/bmpAPng/component.astro +8 -0
  53. package/src/tool/bmpAPng/i18n/en.ts +123 -0
  54. package/src/tool/bmpAPng/i18n/es.ts +123 -0
  55. package/src/tool/bmpAPng/i18n/fr.ts +118 -0
  56. package/src/tool/bmpAPng/index.ts +29 -0
  57. package/src/tool/bmpAPng/seo.astro +14 -0
  58. package/src/tool/bmpAWebp/bibliography.astro +14 -0
  59. package/src/tool/bmpAWebp/component.astro +8 -0
  60. package/src/tool/bmpAWebp/i18n/en.ts +118 -0
  61. package/src/tool/bmpAWebp/i18n/es.ts +123 -0
  62. package/src/tool/bmpAWebp/i18n/fr.ts +118 -0
  63. package/src/tool/bmpAWebp/index.ts +29 -0
  64. package/src/tool/bmpAWebp/seo.astro +14 -0
  65. package/src/tool/gifAJpg/bibliography.astro +14 -0
  66. package/src/tool/gifAJpg/component.astro +8 -0
  67. package/src/tool/gifAJpg/i18n/en.ts +123 -0
  68. package/src/tool/gifAJpg/i18n/es.ts +123 -0
  69. package/src/tool/gifAJpg/i18n/fr.ts +118 -0
  70. package/src/tool/gifAJpg/index.ts +29 -0
  71. package/src/tool/gifAJpg/seo.astro +14 -0
  72. package/src/tool/gifAPng/bibliography.astro +14 -0
  73. package/src/tool/gifAPng/component.astro +8 -0
  74. package/src/tool/gifAPng/i18n/en.ts +123 -0
  75. package/src/tool/gifAPng/i18n/es.ts +123 -0
  76. package/src/tool/gifAPng/i18n/fr.ts +118 -0
  77. package/src/tool/gifAPng/index.ts +29 -0
  78. package/src/tool/gifAPng/seo.astro +14 -0
  79. package/src/tool/gifAWebp/bibliography.astro +14 -0
  80. package/src/tool/gifAWebp/component.astro +8 -0
  81. package/src/tool/gifAWebp/i18n/en.ts +123 -0
  82. package/src/tool/gifAWebp/i18n/es.ts +123 -0
  83. package/src/tool/gifAWebp/i18n/fr.ts +118 -0
  84. package/src/tool/gifAWebp/index.ts +29 -0
  85. package/src/tool/gifAWebp/seo.astro +14 -0
  86. package/src/tool/imagenBase64/bibliography.astro +14 -0
  87. package/src/tool/imagenBase64/component.astro +159 -0
  88. package/src/tool/imagenBase64/i18n/en.ts +137 -0
  89. package/src/tool/imagenBase64/i18n/es.ts +137 -0
  90. package/src/tool/imagenBase64/i18n/fr.ts +132 -0
  91. package/src/tool/imagenBase64/index.ts +43 -0
  92. package/src/tool/imagenBase64/seo.astro +14 -0
  93. package/src/tool/imagenBase64/style.css +299 -0
  94. package/src/tool/jpgAIco/bibliography.astro +14 -0
  95. package/src/tool/jpgAIco/component.astro +8 -0
  96. package/src/tool/jpgAIco/i18n/en.ts +123 -0
  97. package/src/tool/jpgAIco/i18n/es.ts +123 -0
  98. package/src/tool/jpgAIco/i18n/fr.ts +118 -0
  99. package/src/tool/jpgAIco/index.ts +29 -0
  100. package/src/tool/jpgAIco/seo.astro +14 -0
  101. package/src/tool/jpgAPng/bibliography.astro +14 -0
  102. package/src/tool/jpgAPng/component.astro +8 -0
  103. package/src/tool/jpgAPng/i18n/en.ts +128 -0
  104. package/src/tool/jpgAPng/i18n/es.ts +128 -0
  105. package/src/tool/jpgAPng/i18n/fr.ts +123 -0
  106. package/src/tool/jpgAPng/index.ts +29 -0
  107. package/src/tool/jpgAPng/seo.astro +14 -0
  108. package/src/tool/jpgAWebp/bibliography.astro +14 -0
  109. package/src/tool/jpgAWebp/component.astro +8 -0
  110. package/src/tool/jpgAWebp/i18n/en.ts +118 -0
  111. package/src/tool/jpgAWebp/i18n/es.ts +123 -0
  112. package/src/tool/jpgAWebp/i18n/fr.ts +118 -0
  113. package/src/tool/jpgAWebp/index.ts +29 -0
  114. package/src/tool/jpgAWebp/seo.astro +14 -0
  115. package/src/tool/pngAIco/bibliography.astro +14 -0
  116. package/src/tool/pngAIco/component.astro +8 -0
  117. package/src/tool/pngAIco/i18n/en.ts +123 -0
  118. package/src/tool/pngAIco/i18n/es.ts +123 -0
  119. package/src/tool/pngAIco/i18n/fr.ts +118 -0
  120. package/src/tool/pngAIco/index.ts +29 -0
  121. package/src/tool/pngAIco/seo.astro +14 -0
  122. package/src/tool/pngAJpg/bibliography.astro +14 -0
  123. package/src/tool/pngAJpg/component.astro +8 -0
  124. package/src/tool/pngAJpg/i18n/en.ts +133 -0
  125. package/src/tool/pngAJpg/i18n/es.ts +201 -0
  126. package/src/tool/pngAJpg/i18n/fr.ts +128 -0
  127. package/src/tool/pngAJpg/index.ts +29 -0
  128. package/src/tool/pngAJpg/seo.astro +14 -0
  129. package/src/tool/pngAWebp/bibliography.astro +14 -0
  130. package/src/tool/pngAWebp/component.astro +8 -0
  131. package/src/tool/pngAWebp/i18n/en.ts +127 -0
  132. package/src/tool/pngAWebp/i18n/es.ts +132 -0
  133. package/src/tool/pngAWebp/i18n/fr.ts +122 -0
  134. package/src/tool/pngAWebp/index.ts +29 -0
  135. package/src/tool/pngAWebp/seo.astro +14 -0
  136. package/src/tool/svgAJpg/bibliography.astro +14 -0
  137. package/src/tool/svgAJpg/component.astro +8 -0
  138. package/src/tool/svgAJpg/i18n/en.ts +118 -0
  139. package/src/tool/svgAJpg/i18n/es.ts +123 -0
  140. package/src/tool/svgAJpg/i18n/fr.ts +118 -0
  141. package/src/tool/svgAJpg/index.ts +29 -0
  142. package/src/tool/svgAJpg/seo.astro +14 -0
  143. package/src/tool/svgAPng/bibliography.astro +14 -0
  144. package/src/tool/svgAPng/component.astro +8 -0
  145. package/src/tool/svgAPng/i18n/en.ts +123 -0
  146. package/src/tool/svgAPng/i18n/es.ts +128 -0
  147. package/src/tool/svgAPng/i18n/fr.ts +118 -0
  148. package/src/tool/svgAPng/index.ts +29 -0
  149. package/src/tool/svgAPng/seo.astro +14 -0
  150. package/src/tool/webpAIco/bibliography.astro +14 -0
  151. package/src/tool/webpAIco/component.astro +8 -0
  152. package/src/tool/webpAIco/i18n/en.ts +123 -0
  153. package/src/tool/webpAIco/i18n/es.ts +123 -0
  154. package/src/tool/webpAIco/i18n/fr.ts +118 -0
  155. package/src/tool/webpAIco/index.ts +29 -0
  156. package/src/tool/webpAIco/seo.astro +14 -0
  157. package/src/tool/webpAJpg/bibliography.astro +14 -0
  158. package/src/tool/webpAJpg/component.astro +8 -0
  159. package/src/tool/webpAJpg/i18n/en.ts +122 -0
  160. package/src/tool/webpAJpg/i18n/es.ts +127 -0
  161. package/src/tool/webpAJpg/i18n/fr.ts +122 -0
  162. package/src/tool/webpAJpg/index.ts +29 -0
  163. package/src/tool/webpAJpg/seo.astro +14 -0
  164. package/src/tool/webpAPng/bibliography.astro +14 -0
  165. package/src/tool/webpAPng/component.astro +8 -0
  166. package/src/tool/webpAPng/i18n/en.ts +127 -0
  167. package/src/tool/webpAPng/i18n/es.ts +132 -0
  168. package/src/tool/webpAPng/i18n/fr.ts +122 -0
  169. package/src/tool/webpAPng/index.ts +29 -0
  170. package/src/tool/webpAPng/seo.astro +14 -0
  171. package/src/tools.ts +70 -0
  172. package/src/types.ts +69 -0
@@ -0,0 +1,29 @@
1
+ import type { ConvertersToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import type { ImageConverterUI } from '../../shared/ImageConverter.astro';
3
+ import JpgAIcoCalculator from './component.astro';
4
+ import JpgAIcoSEO from './seo.astro';
5
+ import JpgAIcoBibliography from './bibliography.astro';
6
+
7
+ export type JpgAIcoLocaleContent = ToolLocaleContent<ImageConverterUI>;
8
+
9
+ export const jpgAIco: ConvertersToolEntry<ImageConverterUI> = {
10
+ id: 'jpg-a-ico',
11
+ icons: {
12
+ bg: 'mdi:file-image',
13
+ fg: 'mdi:file-export',
14
+ },
15
+ i18n: {
16
+ es: () => import('./i18n/es').then((m) => m.content),
17
+ en: () => import('./i18n/en').then((m) => m.content),
18
+ fr: () => import('./i18n/fr').then((m) => m.content),
19
+ },
20
+ };
21
+
22
+ export { JpgAIcoCalculator, JpgAIcoSEO, JpgAIcoBibliography };
23
+
24
+ export const JPG_A_ICO_TOOL: ToolDefinition = {
25
+ entry: jpgAIco,
26
+ Component: JpgAIcoCalculator,
27
+ SEOComponent: JpgAIcoSEO,
28
+ BibliographyComponent: JpgAIcoBibliography,
29
+ };
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { jpgAIco } 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 jpgAIco.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { jpgAPng } 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 jpgAPng.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SharedBibliography links={content.bibliography} title={content.ui.bibliographyTitle} />}
@@ -0,0 +1,8 @@
1
+ ---
2
+ import SharedImageConverter from '../../shared/ImageConverter.astro';
3
+ import type { ImageConverterUI } from '../../shared/ImageConverter.astro';
4
+
5
+ interface Props { ui: ImageConverterUI }
6
+ const { ui } = Astro.props;
7
+ ---
8
+ <SharedImageConverter from="jpg" to="png" ui={ui} />
@@ -0,0 +1,128 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { JpgAPngLocaleContent } from '../index';
4
+
5
+ const slug = 'jpg-to-png-converter';
6
+ const title = 'Convert JPG to PNG Online and Free - Private';
7
+ const description =
8
+ 'Convert JPG images to PNG in your browser without uploading files. Lossless conversion, free and completely private.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Drag JPG files...',
12
+ convertText: 'To convert them to PNG instantly',
13
+ selectFiles: 'Select files',
14
+ processedFiles: 'Processed files',
15
+ downloadAll: 'Download All (.zip)',
16
+ pending: 'Pending',
17
+ bibliographyTitle: 'Bibliographic References',
18
+ faqTitle: 'Frequently Asked Questions',
19
+ };
20
+
21
+ const faq: JpgAPngLocaleContent['faq'] = [
22
+ {
23
+ question: 'When should I use JPG to PNG?',
24
+ answer:
25
+ 'Whenever you plan to edit text or logos within a photograph. If you save a JPG multiple times, it degrades. PNG freezes the compression.',
26
+ },
27
+ {
28
+ question: 'Will the PNG file have a transparent background immediately?',
29
+ answer:
30
+ 'No. The original JPG was flat and without that type of structural channel. The resulting PNG will prepare that container, then you must isolate the element using Photoshop or another editor.',
31
+ },
32
+ {
33
+ question: 'Does this website have traffic limits?',
34
+ answer:
35
+ 'Thanks to Edge technologies without cloud dependencies, your conversion has no limits because it uses your computer or mobile entirely.',
36
+ },
37
+ ];
38
+
39
+ const howTo: JpgAPngLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Drag JPG to the panel',
42
+ text: 'Upload static JPG images using touch mouse or computer file picker.',
43
+ },
44
+ {
45
+ name: 'Lossless Execution',
46
+ text: 'The Vanilla software pushes the frame bits into a native lossless wrapper of the PNG family.',
47
+ },
48
+ {
49
+ name: 'Finish Session',
50
+ text: 'Click the panel and your browser will deposit the downloaded web assets in your User Folders.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: JpgAPngLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'The W3C PNG Graphics',
57
+ url: 'https://www.w3.org/Graphics/PNG/',
58
+ },
59
+ {
60
+ name: 'Understanding Digital Image Compression',
61
+ url: 'https://en.wikipedia.org/wiki/Image_compression',
62
+ },
63
+ ];
64
+
65
+ const seo: JpgAPngLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Free Online JPG to PNG Converter',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'Converting JPG to PNG is a frequent operation in the workflow of designers, web developers and content editors. The JPG format, while efficient for photographs, applies a lossy compression algorithm that introduces visual artifacts every time the file is re-saved. PNG, on the other hand, uses lossless compression, meaning the image maintains its original fidelity without degrading with each save.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'One of the main reasons to convert from JPG to PNG is to prepare an image for editing. When working with overlaid text, logos or precise graphic elements, PNG prevents the accumulation of JPEG artifacts that would make text edges look blurry or flat colors lose definition.',
79
+ },
80
+ {
81
+ type: 'paragraph',
82
+ html:
83
+ 'Our converter uses the HTML5 Canvas API to perform the conversion entirely in your browser. The JPG file is decoded in memory, drawn on a virtual canvas and exported as lossless PNG. This process ensures you get the best possible result starting from the original JPG file.',
84
+ },
85
+ {
86
+ type: 'tip',
87
+ html:
88
+ 'Remember that converting a JPG to PNG does not recover quality lost by the original JPEG compression. PNG simply freezes the image in its current state without introducing more losses.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'PNG files are typically 2 to 5 times larger than their JPG equivalents. This size difference is the price of lossless compression and transparency support.',
94
+ },
95
+ {
96
+ type: 'paragraph',
97
+ html:
98
+ 'The conversion process is completely private. Our converter does not send any data to external servers; everything happens locally on your device. You can convert corporate images, personal photographs or any sensitive material without worrying about privacy.',
99
+ },
100
+ {
101
+ type: 'paragraph',
102
+ html:
103
+ 'Convert JPG to PNG for free, securely and without limits directly in your browser. Ideal for preparing images for editing or preserving quality in workflows that require multiple saves.',
104
+ },
105
+ ];
106
+
107
+ const appSchema: WithContext<SoftwareApplication> = {
108
+ '@context': 'https://schema.org',
109
+ '@type': 'SoftwareApplication',
110
+ name: title,
111
+ description,
112
+ applicationCategory: 'UtilitiesApplication',
113
+ operatingSystem: 'Web',
114
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
115
+ inLanguage: 'en',
116
+ };
117
+
118
+ export const content: JpgAPngLocaleContent = {
119
+ slug,
120
+ title,
121
+ description,
122
+ ui,
123
+ seo,
124
+ faq,
125
+ bibliography,
126
+ howTo,
127
+ schemas: [appSchema as any],
128
+ };
@@ -0,0 +1,128 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { JpgAPngLocaleContent } from '../index';
4
+
5
+ const slug = 'convertidor-jpg-a-png';
6
+ const title = 'Convertir JPG a PNG Online y Gratis - Privado';
7
+ const description =
8
+ 'Convierte imágenes JPG a PNG en tu navegador sin subir archivos. Conversión lossless, gratuita y totalmente privada.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Arrastra archivos JPG...',
12
+ convertText: 'Para convertirlos a PNG al instante',
13
+ selectFiles: 'Seleccionar archivos',
14
+ processedFiles: 'Archivos procesados',
15
+ downloadAll: 'Descargar Todo (.zip)',
16
+ pending: 'Pendiente',
17
+ bibliographyTitle: 'Referencias Bibliográficas',
18
+ faqTitle: 'Preguntas Frecuentes',
19
+ };
20
+
21
+ const faq: JpgAPngLocaleContent['faq'] = [
22
+ {
23
+ question: '¿Cuándo debería usar JPG a PNG?',
24
+ answer:
25
+ 'Siempre que vayas a editar texto o logos dentro de una fotografía. Si guardas un JPG varias veces, este se ensucia. El PNG congela la compresión.',
26
+ },
27
+ {
28
+ question: '¿El archivo PNG tendrá el fondo transparente de inmediato?',
29
+ answer:
30
+ 'No. El JPG original venía plano y sin ese tipo de canal estructural. El PNG resultante preparará ese contenedor, luego deberás aislar la pieza usando Photoshop u otro editor.',
31
+ },
32
+ {
33
+ question: '¿Tiene esta web límites de tráfico?',
34
+ answer:
35
+ 'Gracias a tecnologías Edge sin dependencias cloud, el peso de tu conversión no supone límites porque usa íntegramente tu terminal informático o móvil.',
36
+ },
37
+ ];
38
+
39
+ const howTo: JpgAPngLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Arrastra JPG al panel',
42
+ text: 'Sube imágenes estáticas en formato JPG usando ratón táctil o selector del ordenador.',
43
+ },
44
+ {
45
+ name: 'Ejecución Lossless',
46
+ text: 'El software de Vanilla empuja los bits del cuadro hacia un envoltorio sin perdidas nativo de la familia PNG.',
47
+ },
48
+ {
49
+ name: 'Terminar Sesión',
50
+ text: 'Pulsa el panel y tu navegador depositará los activos web descargados en tus Carpetas de Usuario.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: JpgAPngLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'The W3C PNG Graphics',
57
+ url: 'https://www.w3.org/Graphics/PNG/',
58
+ },
59
+ {
60
+ name: 'Understanding Digital Image Compression',
61
+ url: 'https://en.wikipedia.org/wiki/Image_compression',
62
+ },
63
+ ];
64
+
65
+ const seo: JpgAPngLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Convertidor JPG a PNG Online Gratuito',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'Convertir JPG a PNG es una operación frecuente en el flujo de trabajo de diseñadores, desarrolladores web y editores de contenido. El formato JPG, aunque eficiente para fotografías, aplica un algoritmo de compresión con pérdida que introduce artefactos visuales cada vez que se vuelve a guardar el archivo. El PNG, en cambio, utiliza compresión sin pérdida, lo que significa que la imagen mantiene su fidelidad original sin degradarse con cada guardado.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'Una de las principales razones para convertir de JPG a PNG es preparar una imagen para su edición. Cuando se trabaja con texto superpuesto, logotipos o elementos gráficos precisos, el formato PNG evita la acumulación de artefactos JPEG que harían que los bordes del texto se vean borrosos o que los colores planos pierdan definición.',
79
+ },
80
+ {
81
+ type: 'paragraph',
82
+ html:
83
+ 'Nuestro convertidor utiliza el Canvas API de HTML5 para realizar la conversión completamente en tu navegador. El archivo JPG se decodifica en memoria, se dibuja en un canvas virtual y se exporta como PNG sin pérdida. Este proceso garantiza que obtienes el mejor resultado posible partiendo del archivo JPG original.',
84
+ },
85
+ {
86
+ type: 'tip',
87
+ html:
88
+ 'Recuerda que convertir un JPG a PNG no recupera la calidad perdida por la compresión JPEG original. El PNG simplemente congela la imagen en su estado actual sin introducir más pérdidas.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'Los archivos PNG suelen ser entre 2 y 5 veces más grandes que sus equivalentes JPG. Esta diferencia de tamaño es el precio de la compresión sin pérdida y soporte de transparencia.',
94
+ },
95
+ {
96
+ type: 'paragraph',
97
+ html:
98
+ 'El proceso de conversión es completamente privado. Nuestro convertidor no envía ningún dato a servidores externos; todo ocurre localmente en tu dispositivo. Puedes convertir imágenes corporativas, fotografías personales o cualquier material sensible sin preocuparte por la privacidad.',
99
+ },
100
+ {
101
+ type: 'paragraph',
102
+ html:
103
+ 'Convierte JPG a PNG de forma gratuita, segura y sin límites directamente en tu navegador. Ideal para preparar imágenes para edición o para preservar la calidad en flujos de trabajo que requieren múltiples guardados.',
104
+ },
105
+ ];
106
+
107
+ const appSchema: WithContext<SoftwareApplication> = {
108
+ '@context': 'https://schema.org',
109
+ '@type': 'SoftwareApplication',
110
+ name: title,
111
+ description,
112
+ applicationCategory: 'UtilitiesApplication',
113
+ operatingSystem: 'Web',
114
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
115
+ inLanguage: 'es',
116
+ };
117
+
118
+ export const content: JpgAPngLocaleContent = {
119
+ slug,
120
+ title,
121
+ description,
122
+ ui,
123
+ seo,
124
+ faq,
125
+ bibliography,
126
+ howTo,
127
+ schemas: [appSchema as any],
128
+ };
@@ -0,0 +1,123 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { JpgAPngLocaleContent } from '../index';
4
+
5
+ const slug = 'convertisseur-jpg-en-png';
6
+ const title = 'Convertir JPG en PNG en Ligne et Gratuitement - Privé';
7
+ const description =
8
+ 'Convertissez des images JPG en PNG dans votre navigateur sans télécharger de fichiers. Conversion sans perte, gratuite et totalement privée.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Faites glisser des fichiers JPG...',
12
+ convertText: 'Pour les convertir en PNG instantanément',
13
+ selectFiles: 'Sélectionner des fichiers',
14
+ processedFiles: 'Fichiers traités',
15
+ downloadAll: 'Tout télécharger (.zip)',
16
+ pending: 'En attente',
17
+ bibliographyTitle: 'Références Bibliographiques',
18
+ faqTitle: 'Questions Fréquentes',
19
+ };
20
+
21
+ const faq: JpgAPngLocaleContent['faq'] = [
22
+ {
23
+ question: 'Quand devrais-je utiliser JPG vers PNG ?',
24
+ answer:
25
+ 'Chaque fois que vous allez éditer du texte ou des logos dans une photographie. Si vous sauvegardez un JPG plusieurs fois, il se dégrade. Le PNG fige la compression.',
26
+ },
27
+ {
28
+ question: 'Le fichier PNG aura-t-il un fond transparent immédiatement ?',
29
+ answer:
30
+ 'Non. Le JPG original était plat et sans ce type de canal structurel. Le PNG résultant préparera ce conteneur, puis vous devrez isoler l\'élément à l\'aide de Photoshop ou d\'un autre éditeur.',
31
+ },
32
+ {
33
+ question: 'Ce site web a-t-il des limites de trafic ?',
34
+ answer:
35
+ 'Grâce aux technologies Edge sans dépendances cloud, votre conversion n\'a aucune limite car elle utilise entièrement votre ordinateur ou mobile.',
36
+ },
37
+ ];
38
+
39
+ const howTo: JpgAPngLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Glisser JPG dans le panneau',
42
+ text: 'Téléchargez des images JPG statiques en utilisant la souris tactile ou le sélecteur de fichiers de l\'ordinateur.',
43
+ },
44
+ {
45
+ name: 'Exécution sans perte',
46
+ text: 'Le logiciel Vanilla pousse les bits de trame vers un wrapper natif sans perte de la famille PNG.',
47
+ },
48
+ {
49
+ name: 'Terminer la session',
50
+ text: 'Cliquez sur le panneau et votre navigateur déposera les actifs web téléchargés dans vos dossiers utilisateur.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: JpgAPngLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'W3C PNG Graphics',
57
+ url: 'https://www.w3.org/Graphics/PNG/',
58
+ },
59
+ {
60
+ name: 'Comprendre la compression d\'image numérique',
61
+ url: 'https://en.wikipedia.org/wiki/Image_compression',
62
+ },
63
+ ];
64
+
65
+ const seo: JpgAPngLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Convertisseur JPG vers PNG en Ligne Gratuit',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'La conversion de JPG en PNG est une opération fréquente dans le flux de travail des designers, développeurs web et éditeurs de contenu. Le format JPG, bien qu\'efficace pour les photographies, applique un algorithme de compression avec perte qui introduit des artefacts visuels chaque fois que le fichier est resauvegardé.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'L\'une des principales raisons de convertir de JPG en PNG est de préparer une image pour son édition. Lorsque vous travaillez avec du texte superposé, des logos ou des éléments graphiques précis, le PNG empêche l\'accumulation d\'artefacts JPEG qui rendraient les bords du texte flous ou les couleurs plates moins définies.',
79
+ },
80
+ {
81
+ type: 'tip',
82
+ html:
83
+ 'N\'oubliez pas que la conversion d\'un JPG en PNG ne récupère pas la qualité perdue par la compression JPEG originale. Le PNG fige simplement l\'image dans son état actuel sans introduire de nouvelles pertes.',
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html:
88
+ 'Les fichiers PNG sont généralement 2 à 5 fois plus grands que leurs équivalents JPG. Cette différence de taille est le prix de la compression sans perte et du support de la transparence.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'Le processus de conversion est totalement privé. Notre convertisseur n\'envoie aucune donnée à des serveurs externes ; tout se passe localement sur votre appareil. Vous pouvez convertir des images d\'entreprise, des photographies personnelles ou tout matériel sensible sans vous soucier de la confidentialité.',
94
+ },
95
+ {
96
+ type: 'paragraph',
97
+ html:
98
+ 'Convertissez JPG en PNG gratuitement, en toute sécurité et sans limites directement dans votre navigateur. Idéal pour préparer des images à l\'édition ou pour préserver la qualité dans des flux de travail nécessitant plusieurs sauvegardes.',
99
+ },
100
+ ];
101
+
102
+ const appSchema: WithContext<SoftwareApplication> = {
103
+ '@context': 'https://schema.org',
104
+ '@type': 'SoftwareApplication',
105
+ name: title,
106
+ description,
107
+ applicationCategory: 'UtilitiesApplication',
108
+ operatingSystem: 'Web',
109
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
110
+ inLanguage: 'fr',
111
+ };
112
+
113
+ export const content: JpgAPngLocaleContent = {
114
+ slug,
115
+ title,
116
+ description,
117
+ ui,
118
+ seo,
119
+ faq,
120
+ bibliography,
121
+ howTo,
122
+ schemas: [appSchema as any],
123
+ };
@@ -0,0 +1,29 @@
1
+ import type { ConvertersToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import type { ImageConverterUI } from '../../shared/ImageConverter.astro';
3
+ import JpgAPngCalculator from './component.astro';
4
+ import JpgAPngSEO from './seo.astro';
5
+ import JpgAPngBibliography from './bibliography.astro';
6
+
7
+ export type JpgAPngLocaleContent = ToolLocaleContent<ImageConverterUI>;
8
+
9
+ export const jpgAPng: ConvertersToolEntry<ImageConverterUI> = {
10
+ id: 'jpg-a-png',
11
+ icons: {
12
+ bg: 'mdi:file-image',
13
+ fg: 'mdi:file-export',
14
+ },
15
+ i18n: {
16
+ es: () => import('./i18n/es').then((m) => m.content),
17
+ en: () => import('./i18n/en').then((m) => m.content),
18
+ fr: () => import('./i18n/fr').then((m) => m.content),
19
+ },
20
+ };
21
+
22
+ export { JpgAPngCalculator, JpgAPngSEO, JpgAPngBibliography };
23
+
24
+ export const JPG_A_PNG_TOOL: ToolDefinition = {
25
+ entry: jpgAPng,
26
+ Component: JpgAPngCalculator,
27
+ SEOComponent: JpgAPngSEO,
28
+ BibliographyComponent: JpgAPngBibliography,
29
+ };
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { jpgAPng } 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 jpgAPng.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { jpgAWebp } 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 jpgAWebp.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SharedBibliography links={content.bibliography} title={content.ui.bibliographyTitle} />}
@@ -0,0 +1,8 @@
1
+ ---
2
+ import SharedImageConverter from '../../shared/ImageConverter.astro';
3
+ import type { ImageConverterUI } from '../../shared/ImageConverter.astro';
4
+
5
+ interface Props { ui: ImageConverterUI }
6
+ const { ui } = Astro.props;
7
+ ---
8
+ <SharedImageConverter from="jpg" to="webp" ui={ui} />
@@ -0,0 +1,118 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { JpgAWebpLocaleContent } from '../index';
4
+
5
+ const slug = 'jpg-to-webp-converter';
6
+ const title = 'Convert JPG to WebP Online and Free - High Quality';
7
+ const description =
8
+ 'Convert JPG images to WebP in your browser. Superior compression without visible loss. No file uploads. Free, unlimited and private.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Drag JPG files...',
12
+ convertText: 'To convert them to WebP instantly',
13
+ selectFiles: 'Select files',
14
+ processedFiles: 'Processed files',
15
+ downloadAll: 'Download All (.zip)',
16
+ pending: 'Pending',
17
+ bibliographyTitle: 'Bibliographic References',
18
+ faqTitle: 'Frequently Asked Questions',
19
+ };
20
+
21
+ const faq: JpgAWebpLocaleContent['faq'] = [
22
+ {
23
+ question: 'Why convert JPG photos to WebP?',
24
+ answer:
25
+ 'WebP allows significantly better compression of traditional JPG files without the human eye noticing the difference, resulting in faster and more modern websites.',
26
+ },
27
+ {
28
+ question: 'Do I have to pay per image?',
29
+ answer:
30
+ 'No, the tool is free and everything is processed directly on your computer. It is unlimited for home or professional use.',
31
+ },
32
+ {
33
+ question: 'Is the conversion secure?',
34
+ answer:
35
+ 'Yes, totally. All processing occurs in the HTML5 Canvas of your local browser without sending any data to external servers.',
36
+ },
37
+ ];
38
+
39
+ const howTo: JpgAWebpLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Insert your JPG photos',
42
+ text: 'Drop your JPG files or drag them directly to the upper area. Detection is instantaneous.',
43
+ },
44
+ {
45
+ name: 'Processing to WebP',
46
+ text: 'The local rendering engine will convert each image file to an ultra-optimized WebP ready for the web.',
47
+ },
48
+ {
49
+ name: 'Download the results',
50
+ text: 'Save each WebP individually or download the ZIP with all converted files.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: JpgAWebpLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'Google WebP Compression Study',
57
+ url: 'https://developers.google.com/speed/webp/docs/webp_study',
58
+ },
59
+ {
60
+ name: 'Web.dev: Serve images in modern formats',
61
+ url: 'https://web.dev/uses-webp-images/',
62
+ },
63
+ ];
64
+
65
+ const seo: JpgAWebpLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Free Online JPG to WebP Converter',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'JPG has been the standard for web photographs for decades. However, Google\'s modern WebP format offers a better quality-to-size ratio, allowing JPG file sizes to be reduced by 25% to 35% while maintaining virtually identical visual quality. For any website looking to improve loading speed, converting JPG to WebP is one of the most impactful optimizations available.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'The JPG to WebP conversion process preserves all the color information of the original image. Unlike PNG which can be affected by transparency handling, JPG is a purely flat format, meaning conversion to WebP is straightforward with no alpha channel complications.',
79
+ },
80
+ {
81
+ type: 'tip',
82
+ html:
83
+ 'Use WebP for product images in e-commerce, blog photographs and any image on your website. Modern browsers like Chrome, Firefox and Safari fully support WebP.',
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html:
88
+ 'According to studies by Google, lossy WebP images are between 25% and 34% smaller than comparable JPG files, which can speed up web page load time by several seconds.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'Convert JPG to WebP at no cost, without limits and with complete privacy. Reduce the weight of your images and improve your website performance immediately.',
94
+ },
95
+ ];
96
+
97
+ const appSchema: WithContext<SoftwareApplication> = {
98
+ '@context': 'https://schema.org',
99
+ '@type': 'SoftwareApplication',
100
+ name: title,
101
+ description,
102
+ applicationCategory: 'UtilitiesApplication',
103
+ operatingSystem: 'Web',
104
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
105
+ inLanguage: 'en',
106
+ };
107
+
108
+ export const content: JpgAWebpLocaleContent = {
109
+ slug,
110
+ title,
111
+ description,
112
+ ui,
113
+ seo,
114
+ faq,
115
+ bibliography,
116
+ howTo,
117
+ schemas: [appSchema as any],
118
+ };