{"_id":"@adiputera/cli-image-resizer","_rev":"3-439f6ae428cafd217b672a2834f532e1","name":"@adiputera/cli-image-resizer","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@adiputera/cli-image-resizer","version":"1.0.0","keywords":["image","resize","cli","sharp","heic","convert","webp","avif"],"author":{"name":"Yusuf F. Adiputera","email":"yfa.adiputera@gmail.com"},"license":"MIT","_id":"@adiputera/cli-image-resizer@1.0.0","maintainers":[{"name":"adiputera","email":"yfa.adiputera@gmail.com"}],"homepage":"https://github.com/adiputera/image-resizer-cli#readme","bugs":{"url":"https://github.com/adiputera/image-resizer-cli/issues"},"bin":{"image-resizer":"dist/cli.js"},"dist":{"shasum":"4149ceae77cf14fa01041ac4b661e0f31fc262fb","tarball":"https://registry.npmjs.org/@adiputera/cli-image-resizer/-/cli-image-resizer-1.0.0.tgz","fileCount":21,"integrity":"sha512-7p1U7oDfCgVYKEtML9FLFz9CbXK29XLfEeGbi/Ya1m5v15tbEsjEfGZTijSd/wtyE5RdgZHkFkkxvpBjS9sX7A==","signatures":[{"sig":"MEQCIF4a1SQLCyXo+29lQ3G17bIfy9okyns2ixkgMa4Q6VKcAiBxetyTUdPjKOYnDAY/Nc1AD6YzoXEE0WIQIeGlwMwj5g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37044},"main":"dist/cli.js","types":"./dist/cli.d.ts","gitHead":"a0cd98f26fc9e3d1574a0ba65b4b2fb6af4c2eeb","scripts":{"cli":"node dist/cli.js","build":"tsc","clean":"rimraf dist","watch":"tsc --watch"},"_npmUser":{"name":"adiputera","email":"yfa.adiputera@gmail.com"},"repository":{"url":"git+https://github.com/adiputera/image-resizer-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI Image resizer and converter using sharp and heic-decode for HEIC support","directories":{},"_nodeVersion":"20.19.5","dependencies":{"sharp":"^0.35.2","heic-decode":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.3","typescript":"^5.7.0","@types/node":"^22.20.0"},"_npmOperationalInternal":{"tmp":"tmp/cli-image-resizer_1.0.0_1782901151854_0.1133869886719483","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@adiputera/cli-image-resizer","version":"1.0.1","keywords":["image","resize","cli","sharp","heic","convert","webp","avif"],"author":{"name":"Yusuf F. Adiputera","email":"yfa.adiputera@gmail.com"},"license":"MIT","_id":"@adiputera/cli-image-resizer@1.0.1","maintainers":[{"name":"adiputera","email":"yfa.adiputera@gmail.com"}],"homepage":"https://github.com/adiputera/image-resizer-cli#readme","bugs":{"url":"https://github.com/adiputera/image-resizer-cli/issues"},"bin":{"image-resizer":"dist/cli.js"},"dist":{"shasum":"91efcbcdca70b6263f29c816f80bb3bc2779194a","tarball":"https://registry.npmjs.org/@adiputera/cli-image-resizer/-/cli-image-resizer-1.0.1.tgz","fileCount":21,"integrity":"sha512-ZgK/XhDyNqNPpjlxWekDoqPc24cEirfWTv1xyUDxNapZjq3kz2JjBFxqH/Y3sw1cKeacnqOAxzLCSY2+pmD48g==","signatures":[{"sig":"MEUCICwriBj/53muT6QIcJxbAcNelWGP0n3HJ+JBpVJiVdCZAiEAgrTNpSYRQEaaTjgguEJAcadUwSOvZQYFl+I1nx2Xlyk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37420},"main":"dist/cli.js","types":"./dist/cli.d.ts","gitHead":"51d265a61a893f961f6940bd0ef4bf790b66ef19","scripts":{"cli":"node dist/cli.js","build":"tsc","clean":"rimraf dist","watch":"tsc --watch"},"_npmUser":{"name":"adiputera","email":"yfa.adiputera@gmail.com"},"repository":{"url":"git+https://github.com/adiputera/image-resizer-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI Image resizer and converter using sharp and heic-decode for HEIC support","directories":{},"_nodeVersion":"20.19.5","dependencies":{"sharp":"^0.35.2","heic-decode":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.3","typescript":"^5.7.0","@types/node":"^22.20.0"},"_npmOperationalInternal":{"tmp":"tmp/cli-image-resizer_1.0.1_1783073562901_0.6270084481534233","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@adiputera/cli-image-resizer","version":"1.0.2","description":"CLI Image resizer and converter using sharp and heic-decode for HEIC support","author":{"name":"Yusuf F. Adiputera","email":"yfa.adiputera@gmail.com"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/adiputera/image-resizer-cli.git"},"keywords":["image","resize","cli","sharp","heic","convert","webp","avif"],"scripts":{"build":"tsc","watch":"tsc --watch","clean":"rimraf dist","cli":"node dist/cli.js"},"bin":{"image-resizer":"dist/cli.js"},"dependencies":{"heic-decode":"^2.1.0","sharp":"^0.35.2"},"devDependencies":{"@types/node":"^22.20.0","rimraf":"^6.1.3","typescript":"^5.7.0"},"main":"dist/cli.js","license":"MIT","_id":"@adiputera/cli-image-resizer@1.0.2","gitHead":"91668462a32163ae184e65105786dc3bb5b6c4e8","types":"./dist/cli.d.ts","bugs":{"url":"https://github.com/adiputera/image-resizer-cli/issues"},"homepage":"https://github.com/adiputera/image-resizer-cli#readme","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-nR9huC5TwSIVi2IJAdGbX0/s0HQVtdKYU8RQ4ydkdDAuH9QAW1GggyyTyYwUkK0X+UmsW+gxQVqPKLMrMTio0A==","shasum":"41a1750958459d6de0c9f60657bac0f48f6dd74a","tarball":"https://registry.npmjs.org/@adiputera/cli-image-resizer/-/cli-image-resizer-1.0.2.tgz","fileCount":21,"unpackedSize":43010,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAbwyxL4nKA/Nk+1FD23rswPAFRUWIeFzq9AbQO6rEK7AiEAmWY3xPULAr0efYyJu8gE9NMDVRVdI4URqbPc8G/5baY="}]},"_npmUser":{"name":"adiputera","email":"yfa.adiputera@gmail.com"},"directories":{},"maintainers":[{"name":"adiputera","email":"yfa.adiputera@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli-image-resizer_1.0.2_1783678183625_0.38717261376315215"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-01T10:19:11.583Z","modified":"2026-07-10T10:09:43.915Z","1.0.0":"2026-07-01T10:19:11.983Z","1.0.1":"2026-07-03T10:12:43.039Z","1.0.2":"2026-07-10T10:09:43.793Z"},"bugs":{"url":"https://github.com/adiputera/image-resizer-cli/issues"},"author":{"name":"Yusuf F. Adiputera","email":"yfa.adiputera@gmail.com"},"license":"MIT","homepage":"https://github.com/adiputera/image-resizer-cli#readme","keywords":["image","resize","cli","sharp","heic","convert","webp","avif"],"repository":{"type":"git","url":"git+https://github.com/adiputera/image-resizer-cli.git"},"description":"CLI Image resizer and converter using sharp and heic-decode for HEIC support","maintainers":[{"name":"adiputera","email":"yfa.adiputera@gmail.com"}],"readme":"# CLI Image Resizer\n\nA lightweight CLI tool for image resizing and conversion, built with TypeScript, [Sharp](https://sharp.pixelplumbing.com/), and [heic-decode](https://github.com/catdad-experiments/heic-decode).\n\n## Features\n\n- 📸 **HEIC/HEIF Support**: Convert HEIC/HEIF images to standard formats (PNG, JPEG, WebP, AVIF, GIF)\n- 🖼️ **Multiple Formats**: Support for WebP, AVIF, PNG, JPEG, GIF\n- 📏 **Smart Resizing**: Multiple fit strategies (cover, contain, fill, inside, outside)\n- 🎨 **Image Effects**: Rotation, blur, grayscale, and cropping\n- 🌐 **URL Support**: Download and process images directly from URLs\n- ⚡ **Fast & Efficient**: Powered by Sharp's high-performance image processing\n\n## Prerequisites\n\n- Node.js 18+ or 20+\n\n## Installation\n\nInstall globally via npm:\n```bash\nnpm install -g @adiputera/cli-image-resizer\n```\n\nAlternatively, run it directly without installing using `npx`:\n```bash\nnpx @adiputera/cli-image-resizer -i <input> -o <output> [options]\n```\n\n## Local Development Setup\n\nIf you want to run or modify the tool locally:\n\n1. Install dependencies:\n```bash\nnpm install\n```\n\n2. Build the project:\n```bash\nnpm run build\n```\n\n3. (Optional) Link globally to use as `image-resizer` everywhere:\n```bash\nnpm link\n```\n\n## Usage\n\nOnce installed globally or linked, you can run the tool using the `image-resizer` command:\n```bash\nimage-resizer -i <input> -o <output> [options]\n```\n\n*(Note: If you are running this from the local repository setup, simply replace `image-resizer` with `npm run cli --` in the examples below.)*\n\n### Options\n\n- `-i, --input <path/url>` **(Required)**: Input file path or URL to download.\n- `-o, --output <path>` **(Required)**: Output file path.\n- `-w, --width <pixels>`: Target width in pixels.\n- `-h, --height <pixels>`: Target height in pixels.\n- `-f, --format <format>`: Output format (e.g., `webp`, `jpeg`, `png`, `avif`, `gif`).\n- `-q, --quality <number>`: Output quality (1-100). Default is `80`.\n- `-a, --action <action>`: Action to perform (`resize`, `crop`). Default is `resize`.\n- `--fit <strategy>`: Fit strategy (`cover`, `contain`, `fill`, `inside`, `outside`).\n- `--withoutEnlargement`: Prevent enlarging the image if it is smaller than the target size.\n- `--rotate <degrees/auto>`: Degrees to rotate the image, or `auto` for EXIF orientation.\n- `--blur <sigma>`: Sigma value for Gaussian blur.\n- `--grayscale`: Convert the image to grayscale.\n- `--help`: Show the help message.\n\n---\n\n### Examples\n\n**Basic Resize (Local file)**\nResize an image to 800x600 pixels.\n```bash\nimage-resizer -i photo.jpg -o photo-resized.jpg -w 800 -h 600\n```\n\n**Convert HEIC to Standard Format**\nConvert HEIC/HEIF images to PNG, JPEG, or WebP.\n```bash\n# Convert HEIC to JPEG\nimage-resizer -i IMG_1234.HEIC -o output.jpg -f jpg -q 90\n\n# Convert HEIC to WebP with resize\nimage-resizer -i IMG_1234.HEIC -o output.webp -f webp -w 1920 -q 85\n```\n\n**Convert Format & Adjust Quality**\nConvert a PNG to WebP with 90% quality.\n```bash\nimage-resizer -i image.png -o image.webp -f webp -q 90\n```\n\n**Process an Image from a URL**\nDownload and convert an image from the web directly into AVIF format.\n```bash\nimage-resizer -i \"https://example.com/logo.png\" -o logo.avif -f avif\n```\n\n**Advanced Transformations (Grayscale, Blur, and Rotate)**\nRotate by 90 degrees, convert to grayscale, and add a blur effect.\n```bash\nimage-resizer -i original.jpg -o modified.jpg --rotate 90 --grayscale --blur 5.5\n```\n\n**Use a Specific Fit Strategy**\nEnsure the entire image is visible within a 500x500 box without cropping (`contain`), preserving aspect ratio.\n```bash\nimage-resizer -i photo.jpg -o photo-contained.jpg -w 500 -h 500 --fit contain\n```\n\n## Contributing & Bug Reports\n\nContributions, issues, and feature requests are very welcome! \n\n- **Found a bug?** Please feel free to open an issue in the repository with details about what went wrong and, if possible, the image file that caused the problem.\n- **Want to contribute?** Feel free to fork the repository and submit a Pull Request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","readmeFilename":"README.md"}