diff --git a/components.d.ts b/components.d.ts index 3e65c3cc..742dcaf6 100644 --- a/components.d.ts +++ b/components.d.ts @@ -101,6 +101,7 @@ declare module '@vue/runtime-core' { IconMdiSearch: typeof import('~icons/mdi/search')['default'] IconMdiTranslate: typeof import('~icons/mdi/translate')['default'] IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default'] + ImageResizer: typeof import('./src/tools/image-resizer/image-resizer.vue')['default'] InputCopyable: typeof import('./src/components/InputCopyable.vue')['default'] IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default'] Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default'] diff --git a/locales/en.yml b/locales/en.yml index b195dbd8..3b50cf8c 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -392,3 +392,7 @@ tools: text-to-binary: title: Text to ASCII binary description: Convert text to its ASCII binary representation and vice-versa. + + image-resizer: + title: Image resizer + description: Convert the width and height of an image file, preview, and download it in a desired format (.jpg, .jpeg, .png, .bmp, .ico, .svg) \ No newline at end of file diff --git a/src/tools/image-resizer/image-resizer.vue b/src/tools/image-resizer/image-resizer.vue new file mode 100644 index 00000000..3c88ff1b --- /dev/null +++ b/src/tools/image-resizer/image-resizer.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/src/tools/image-resizer/index.ts b/src/tools/image-resizer/index.ts new file mode 100644 index 00000000..968d2353 --- /dev/null +++ b/src/tools/image-resizer/index.ts @@ -0,0 +1,12 @@ +import { IconResize } from '@tabler/icons-vue'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Image resizer', + path: '/image-resizer', + description: '', + keywords: ['image', 'resizer', 'favicon', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg'], + component: () => import('./image-resizer.vue'), + icon: IconResize, + createdAt: new Date('2024-10-22'), +}); diff --git a/src/tools/index.ts b/src/tools/index.ts index 388cfaf4..997f5331 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -1,6 +1,7 @@ import { tool as base64FileConverter } from './base64-file-converter'; import { tool as base64StringConverter } from './base64-string-converter'; import { tool as basicAuthGenerator } from './basic-auth-generator'; +import { tool as imageResizer } from './image-resizer'; import { tool as emailNormalizer } from './email-normalizer'; import { tool as asciiTextDrawer } from './ascii-text-drawer'; @@ -141,7 +142,13 @@ export const toolsByCategory: ToolCategory[] = [ }, { name: 'Images and videos', - components: [qrCodeGenerator, wifiQrCodeGenerator, svgPlaceholderGenerator, cameraRecorder], + components: [ + qrCodeGenerator, + wifiQrCodeGenerator, + svgPlaceholderGenerator, + cameraRecorder, + imageResizer, + ], }, { name: 'Development',