@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 AvifAWebpCalculator from './component.astro';
4
+ import AvifAWebpSEO from './seo.astro';
5
+ import AvifAWebpBibliography from './bibliography.astro';
6
+
7
+ export type AvifAWebpLocaleContent = ToolLocaleContent<ImageConverterUI>;
8
+
9
+ export const avifAWebp: ConvertersToolEntry<ImageConverterUI> = {
10
+ id: 'avif-a-webp',
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 { AvifAWebpCalculator, AvifAWebpSEO, AvifAWebpBibliography };
23
+
24
+ export const AVIF_A_WEBP_TOOL: ToolDefinition = {
25
+ entry: avifAWebp,
26
+ Component: AvifAWebpCalculator,
27
+ SEOComponent: AvifAWebpSEO,
28
+ BibliographyComponent: AvifAWebpBibliography,
29
+ };
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { avifAWebp } 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 avifAWebp.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 { bmpAJpg } 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 bmpAJpg.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="bmp" to="jpg" ui={ui} />
@@ -0,0 +1,123 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { BmpAJpgLocaleContent } from '../index';
4
+
5
+ const slug = 'bmp-to-jpg-converter';
6
+ const title = 'Convert BMP to JPG Online - Fast, Free and Private';
7
+ const description =
8
+ 'Convert BMP images to JPG in your browser. Drastically reduce file size. No file uploads to servers. Free and 100% private.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Drag BMP files...',
12
+ convertText: 'To convert them to JPG 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: BmpAJpgLocaleContent['faq'] = [
22
+ {
23
+ question: 'Why convert BMP to JPG?',
24
+ answer:
25
+ 'BMP does not compress data, resulting in extremely large files. JPG compresses the image drastically while maintaining excellent visual quality for web and distribution.',
26
+ },
27
+ {
28
+ question: 'Is it safe to convert my images here?',
29
+ answer:
30
+ '100% safe. Your privacy is guaranteed since processing is done entirely locally using your own web browser engine.',
31
+ },
32
+ {
33
+ question: 'How does the tool work?',
34
+ answer:
35
+ 'Simply drag your BMP files, and our JavaScript script will read the pixels to redraw them on an HTML canvas and export them in JPEG encoding instantly.',
36
+ },
37
+ ];
38
+
39
+ const howTo: BmpAJpgLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Upload your BMP files',
42
+ text: 'Drag and drop or select your BMP format images in the designated area.',
43
+ },
44
+ {
45
+ name: 'Automatic Processing',
46
+ text: 'The tool rasterizes the image and applies the optimal level of JPG compression in milliseconds.',
47
+ },
48
+ {
49
+ name: 'Individual or Batch Download',
50
+ text: 'Get your new web-optimized images one at a time or by downloading a ZIP file.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: BmpAJpgLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'BMP File Format Specification',
57
+ url: 'https://en.wikipedia.org/wiki/BMP_file_format',
58
+ },
59
+ {
60
+ name: 'JPEG.org',
61
+ url: 'https://jpeg.org/',
62
+ },
63
+ ];
64
+
65
+ const seo: BmpAJpgLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Free Online BMP to JPG Converter',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'BMP (Bitmap) is one of the oldest image formats, originally developed by Microsoft for Windows. Its main characteristic is that it stores image data without compression, meaning a BMP file of a standard photograph can take up tens or even hundreds of megabytes. This makes it completely unsuitable for sharing on the internet or by email.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'Converting BMP to JPG is the most practical solution to drastically reduce the size of these files. JPG applies intelligent compression that can reduce a BMP by 95% or more while maintaining excellent visual quality for photographs.',
79
+ },
80
+ {
81
+ type: 'tip',
82
+ html:
83
+ 'If you have very large BMP files, convert one first to verify that the resulting JPG quality is satisfactory, then process the full batch.',
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html:
88
+ 'An uncompressed BMP for a 1920x1080 image takes approximately 6 MB. The same content in high-quality JPG can take only 200-400 KB, a reduction of 93-97%.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'The conversion happens entirely in your browser. The BMP file is read via FileReader API, decoded by the browser\'s native image engine, drawn on an HTML5 canvas and exported as JPG. All this happens locally without any data transfer to the internet.',
94
+ },
95
+ {
96
+ type: 'paragraph',
97
+ html:
98
+ 'Convert BMP to JPG for free, privately and without limits directly in your browser. Reduce your image sizes by up to 97% without noticeable visual quality loss.',
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: 'en',
111
+ };
112
+
113
+ export const content: BmpAJpgLocaleContent = {
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,123 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { BmpAJpgLocaleContent } from '../index';
4
+
5
+ const slug = 'convertidor-bmp-a-jpg';
6
+ const title = 'Convertir BMP a JPG Online - Rápido, Gratis y Privado';
7
+ const description =
8
+ 'Convierte imágenes BMP a JPG en tu navegador. Reduce el tamaño drásticamente. Sin subir archivos a servidores. Gratis y 100% privado.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Arrastra archivos BMP...',
12
+ convertText: 'Para convertirlos a JPG 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: BmpAJpgLocaleContent['faq'] = [
22
+ {
23
+ question: '¿Por qué convertir BMP a JPG?',
24
+ answer:
25
+ 'El formato BMP no comprime los datos, resultando en archivos extremadamente grandes. El formato JPG comprime la imagen drásticamente manteniendo una calidad visual excelente para web y distribución.',
26
+ },
27
+ {
28
+ question: '¿Es seguro convertir mis imágenes aquí?',
29
+ answer:
30
+ '100% seguro. Tu privacidad está garantizada ya que el procesamiento se realiza íntegramente de forma local usando el motor de tu propio navegador web.',
31
+ },
32
+ {
33
+ question: '¿Cómo funciona la herramienta?',
34
+ answer:
35
+ 'Simplemente arrastra tus archivos BMP, y nuestro script en JavaScript leerá los píxeles para re-dibujarlos sobre un canvas HTML y exportarlos en codificación JPEG al instante.',
36
+ },
37
+ ];
38
+
39
+ const howTo: BmpAJpgLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Sube tus archivos BMP',
42
+ text: 'Arrastra y suelta o selecciona tus imágenes en formato BMP en la zona designada.',
43
+ },
44
+ {
45
+ name: 'Procesamiento Automático',
46
+ text: 'La herramienta rasteriza la imagen y aplica el nivel óptimo de compresión en formato JPG en milisegundos.',
47
+ },
48
+ {
49
+ name: 'Descarga Individual o en Lote',
50
+ text: 'Obtén tus nuevas imágenes optimizadas para web ya sea una a una o descargando un archivo ZIP.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: BmpAJpgLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'BMP File Format Specification',
57
+ url: 'https://en.wikipedia.org/wiki/BMP_file_format',
58
+ },
59
+ {
60
+ name: 'JPEG.org',
61
+ url: 'https://jpeg.org/',
62
+ },
63
+ ];
64
+
65
+ const seo: BmpAJpgLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Convertidor BMP a JPG Online Gratuito',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'El formato BMP (Bitmap) es uno de los formatos de imagen más antiguos, desarrollado originalmente por Microsoft para Windows. Su característica principal es que almacena los datos de imagen sin compresión, lo que significa que un archivo BMP de una fotografía estándar puede ocupar decenas o incluso cientos de megabytes. Esto lo hace completamente inadecuado para compartir en internet o por email.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'Convertir BMP a JPG es la solución más práctica para reducir drásticamente el tamaño de estos archivos. El formato JPG aplica compresión inteligente que puede reducir el tamaño de un BMP en un 95% o más, manteniendo una calidad visual excelente para fotografías. Un BMP de 10 MB puede convertirse fácilmente en un JPG de apenas 500 KB.',
79
+ },
80
+ {
81
+ type: 'paragraph',
82
+ html:
83
+ 'La conversión se realiza completamente en tu navegador. El archivo BMP se lee mediante la API FileReader, se decodifica por el motor de imagen nativo del navegador, se dibuja sobre un canvas HTML5 y se exporta como JPG. Todo esto ocurre localmente sin ninguna transferencia de datos a internet.',
84
+ },
85
+ {
86
+ type: 'tip',
87
+ html:
88
+ 'Si tienes archivos BMP muy grandes, convierte primero uno para verificar que la calidad JPG resultante es satisfactoria, luego procesa el lote completo.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'Un archivo BMP sin comprimir para una imagen de 1920x1080 píxeles ocupa aproximadamente 6 MB. El mismo contenido en JPG de alta calidad puede ocupar solo 200-400 KB, una reducción del 93-97%.',
94
+ },
95
+ {
96
+ type: 'paragraph',
97
+ html:
98
+ 'Convierte BMP a JPG de forma gratuita, privada e ilimitada directamente en tu navegador. Reduce el tamaño de tus imágenes hasta un 97% sin perder calidad visual apreciable.',
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: 'es',
111
+ };
112
+
113
+ export const content: BmpAJpgLocaleContent = {
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,118 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { BmpAJpgLocaleContent } from '../index';
4
+
5
+ const slug = 'convertisseur-bmp-en-jpg';
6
+ const title = 'Convertir BMP en JPG en Ligne - Rapide, Gratuit et Privé';
7
+ const description =
8
+ 'Convertissez des images BMP en JPG dans votre navigateur. Réduction drastique de la taille. Sans téléchargement vers des serveurs. Gratuit et 100% privé.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Faites glisser des fichiers BMP...',
12
+ convertText: 'Pour les convertir en JPG 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: BmpAJpgLocaleContent['faq'] = [
22
+ {
23
+ question: 'Pourquoi convertir BMP en JPG ?',
24
+ answer:
25
+ 'Le format BMP ne compresse pas les données, ce qui donne des fichiers extrêmement volumineux. Le JPG compresse l\'image de manière drastique tout en maintenant une excellente qualité visuelle pour le web et la distribution.',
26
+ },
27
+ {
28
+ question: 'Est-il sûr de convertir mes images ici ?',
29
+ answer:
30
+ '100% sûr. Votre confidentialité est garantie puisque le traitement est effectué entièrement localement en utilisant le moteur de votre propre navigateur web.',
31
+ },
32
+ {
33
+ question: 'Comment fonctionne l\'outil ?',
34
+ answer:
35
+ 'Faites simplement glisser vos fichiers BMP, et notre script JavaScript lira les pixels pour les redessiner sur un canvas HTML et les exporter en codage JPEG instantanément.',
36
+ },
37
+ ];
38
+
39
+ const howTo: BmpAJpgLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Téléchargez vos fichiers BMP',
42
+ text: 'Faites glisser-déposer ou sélectionnez vos images au format BMP dans la zone désignée.',
43
+ },
44
+ {
45
+ name: 'Traitement automatique',
46
+ text: 'L\'outil rastérise l\'image et applique le niveau de compression JPG optimal en quelques millisecondes.',
47
+ },
48
+ {
49
+ name: 'Téléchargement individuel ou par lot',
50
+ text: 'Obtenez vos nouvelles images optimisées pour le web une à une ou en téléchargeant un fichier ZIP.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: BmpAJpgLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'Spécification du format de fichier BMP',
57
+ url: 'https://en.wikipedia.org/wiki/BMP_file_format',
58
+ },
59
+ {
60
+ name: 'JPEG.org',
61
+ url: 'https://jpeg.org/',
62
+ },
63
+ ];
64
+
65
+ const seo: BmpAJpgLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Convertisseur BMP vers JPG en Ligne Gratuit',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'BMP (Bitmap) est l\'un des formats d\'image les plus anciens, développé à l\'origine par Microsoft pour Windows. Sa caractéristique principale est qu\'il stocke les données d\'image sans compression, ce qui signifie qu\'un fichier BMP d\'une photographie standard peut occuper des dizaines voire des centaines de mégaoctets.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'Convertir BMP en JPG est la solution la plus pratique pour réduire drastiquement la taille de ces fichiers. Le JPG applique une compression intelligente qui peut réduire un BMP de 95% ou plus tout en maintenant une excellente qualité visuelle pour les photographies.',
79
+ },
80
+ {
81
+ type: 'tip',
82
+ html:
83
+ 'Si vous avez de très gros fichiers BMP, convertissez-en un d\'abord pour vérifier que la qualité JPG résultante est satisfaisante, puis traitez le lot complet.',
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html:
88
+ 'Un BMP non compressé pour une image 1920x1080 occupe environ 6 Mo. Le même contenu en JPG de haute qualité peut n\'occuper que 200-400 Ko, une réduction de 93-97%.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'Convertissez BMP en JPG gratuitement, en toute confidentialité et sans limites directement dans votre navigateur. Réduisez la taille de vos images jusqu\'à 97% sans perte de qualité visuelle notable.',
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: 'fr',
106
+ };
107
+
108
+ export const content: BmpAJpgLocaleContent = {
109
+ slug,
110
+ title,
111
+ description,
112
+ ui,
113
+ seo,
114
+ faq,
115
+ bibliography,
116
+ howTo,
117
+ schemas: [appSchema as any],
118
+ };
@@ -0,0 +1,29 @@
1
+ import type { ConvertersToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import type { ImageConverterUI } from '../../shared/ImageConverter.astro';
3
+ import BmpAJpgCalculator from './component.astro';
4
+ import BmpAJpgSEO from './seo.astro';
5
+ import BmpAJpgBibliography from './bibliography.astro';
6
+
7
+ export type BmpAJpgLocaleContent = ToolLocaleContent<ImageConverterUI>;
8
+
9
+ export const bmpAJpg: ConvertersToolEntry<ImageConverterUI> = {
10
+ id: 'bmp-a-jpg',
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 { BmpAJpgCalculator, BmpAJpgSEO, BmpAJpgBibliography };
23
+
24
+ export const BMP_A_JPG_TOOL: ToolDefinition = {
25
+ entry: bmpAJpg,
26
+ Component: BmpAJpgCalculator,
27
+ SEOComponent: BmpAJpgSEO,
28
+ BibliographyComponent: BmpAJpgBibliography,
29
+ };
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { bmpAJpg } 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 bmpAJpg.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 { bmpAPng } 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 bmpAPng.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="bmp" to="png" ui={ui} />
@@ -0,0 +1,123 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { BmpAPngLocaleContent } from '../index';
4
+
5
+ const slug = 'bmp-to-png-converter';
6
+ const title = 'BMP to PNG Converter | Lossless Local Format';
7
+ const description =
8
+ 'Convert BMP images to PNG without quality loss. Modern compression without artifacts. No file uploads. Free and 100% private.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Drag BMP 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: BmpAPngLocaleContent['faq'] = [
22
+ {
23
+ question: 'What is the main difference between BMP and PNG?',
24
+ answer:
25
+ 'Both BMP and PNG are lossless formats. The difference lies in optimization: PNG uses modern compression algorithms to store the same image taking up 5 to 10 times less memory than BMP.',
26
+ },
27
+ {
28
+ question: 'Is the conversion truly private?',
29
+ answer:
30
+ 'Yes. Your computer handles all the photographic processing. Absolutely nobody accesses your files during local processing.',
31
+ },
32
+ {
33
+ question: 'Why PNG over JPEG in this case?',
34
+ answer:
35
+ 'If you have a BMP file, it is because the image has precise colors. Converting a BMP to the destructive JPG standard would dirty your clean colors. PNG protects that fidelity.',
36
+ },
37
+ ];
38
+
39
+ const howTo: BmpAPngLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Load your photo',
42
+ text: 'Calmly move the BMP source files to our web element drop zone.',
43
+ },
44
+ {
45
+ name: 'Translate without network transmission',
46
+ text: 'Experience in just one second the clean processing done locally by your HTML5 JS.',
47
+ },
48
+ {
49
+ name: 'Get pure PNGs',
50
+ text: 'Download the PNG replicas individually or via a compressed package.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: BmpAPngLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'BMP File Format',
57
+ url: 'https://en.wikipedia.org/wiki/BMP_file_format',
58
+ },
59
+ {
60
+ name: 'PNG Specification W3C',
61
+ url: 'https://www.w3.org/TR/png/',
62
+ },
63
+ ];
64
+
65
+ const seo: BmpAPngLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Free Online BMP to PNG Converter',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'Both BMP and PNG are lossless image formats, meaning no visual information is discarded during storage. However, there is a fundamental difference in efficiency: BMP stores data raw without any compression, while PNG uses the Deflate compression algorithm to reduce file size without losing a single pixel of information.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'Converting BMP to PNG is particularly useful when working with screenshots, UI graphics, flat-color designs or any image where color accuracy is a priority. PNG will preserve every color value exactly the same as the original BMP, but with a considerably smaller file size.',
79
+ },
80
+ {
81
+ type: 'tip',
82
+ html:
83
+ 'If you need maximum editing software compatibility and perfect color accuracy, convert BMP to PNG instead of JPG. Lossless PNG guarantees colors never deteriorate.',
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html:
88
+ 'A typical full-screen BMP (1920x1080) takes about 6 MB. The same content in PNG can take 1-3 MB, achieving a 50-85% reduction without any quality loss.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'Our converter performs all processing locally. The BMP file is decoded in memory, drawn on an HTML5 canvas and exported as PNG using the browser\'s native compression algorithm. No data is transferred to external servers.',
94
+ },
95
+ {
96
+ type: 'paragraph',
97
+ html:
98
+ 'Convert BMP to PNG without quality loss, for free and with complete privacy. The best option for preserving exact colors with an optimized file size.',
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: 'en',
111
+ };
112
+
113
+ export const content: BmpAPngLocaleContent = {
114
+ slug,
115
+ title,
116
+ description,
117
+ ui,
118
+ seo,
119
+ faq,
120
+ bibliography,
121
+ howTo,
122
+ schemas: [appSchema as any],
123
+ };