{"id":16702183,"url":"https://github.com/akash-akya/vix","last_synced_at":"2026-01-23T13:55:00.127Z","repository":{"id":37020179,"uuid":"310824715","full_name":"akash-akya/vix","owner":"akash-akya","description":"Elixir extension for libvips","archived":false,"fork":false,"pushed_at":"2025-07-13T12:42:25.000Z","size":1200,"stargazers_count":219,"open_issues_count":4,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-28T12:49:36.728Z","etag":null,"topics":["elixir","erlang","image-processing","imagemagick","libvips","nif","vips","vix"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akash-akya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-07T11:01:13.000Z","updated_at":"2025-09-12T23:37:11.000Z","dependencies_parsed_at":"2024-02-02T17:26:58.289Z","dependency_job_id":"dc47d3c1-1f12-42ff-a693-74ff837a85e8","html_url":"https://github.com/akash-akya/vix","commit_stats":{"total_commits":262,"total_committers":7,"mean_commits":37.42857142857143,"dds":0.1297709923664122,"last_synced_commit":"d29929a33f8fc04507d465c386e8f7ffc26500f1"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/akash-akya/vix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akash-akya%2Fvix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akash-akya%2Fvix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akash-akya%2Fvix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akash-akya%2Fvix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akash-akya","download_url":"https://codeload.github.com/akash-akya/vix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akash-akya%2Fvix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","erlang","image-processing","imagemagick","libvips","nif","vips","vix"],"created_at":"2024-10-12T18:47:07.204Z","updated_at":"2026-01-23T13:55:00.102Z","avatar_url":"https://github.com/akash-akya.png","language":"Elixir","funding_links":[],"categories":["Vision \u0026 Image Processing"],"sub_categories":["How to Join"],"readme":"# Vix\n\n[![CI](https://github.com/akash-akya/vix/actions/workflows/ci.yaml/badge.svg)](https://github.com/akash-akya/vix/actions/workflows/ci.yaml)\n[![Hex.pm](https://img.shields.io/hexpm/v/vix.svg)](https://hex.pm/packages/vix)\n[![docs](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/vix/)\n\n\nBlazing fast image processing for Elixir powered by [libvips](https://libvips.github.io/libvips/), the same engine that powers [sharp.js](https://github.com/lovell/sharp).\n\n## Perfect For\n\n- Building image processing APIs and services\n- Generating thumbnails at scale\n- Image manipulation in web applications\n- Computer vision preprocessing\n- Processing large scientific/satellite images\n\n## Features\n\n- **High Performance**: Uses libvips' demand-driven, horizontally threaded architecture\n- **Memory Efficient**: Processes images in chunks, perfect for large files\n- **Streaming Support**: Read/write images without loading them fully into memory\n- **Rich Ecosystem**: Zero-copy integration with [Nx](https://hex.pm/packages/nx) and [eVision](https://hex.pm/packages/evision)\n- **Zero Setup**: Pre-built binaries for MacOS and Linux platforms included.\n- **Auto-updating API**: New libvips features automatically available\n- **Comprehensive Documentation**: [Type specifications and documentation](https://hexdocs.pm/vix/Vix.Vips.Operation.html) for 300+ operations\n\n## Quick Start\n\n```elixir\nMix.install([\n  {:vix, \"~\u003e 0.23\"}\n])\n\nalias Vix.Vips.{Image, Operation}\n\n# Create a thumbnail and optimize for web\n{:ok, thumb} = Operation.thumbnail(\"profile.jpg\", 300)\n:ok = Image.write_to_file(thumb, \"thumbnail.jpg\", Q: 90, strip: true, interlace: true)\n```\n\n[👉 Try in Livebook](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fakash-akya%2Fvix%2Fblob%2Fmaster%2Flivebooks%2Fintroduction.livemd)\n\n\u003c!-- add before \u0026 after --\u003e\n\n## Common Operations\n\n### Basic Processing\n```elixir\n# Reading an image\n{:ok, img} = Image.new_from_file(\"profile.jpg\")\n\n# Resize preserving aspect ratio\n{:ok, resized} = Operation.resize(img, 0.5)  # 50% of original size\n\n# Crop a section\n{:ok, cropped} = Operation.crop(img, 100, 100, 500, 500)\n\n# Rotate with white background\n{:ok, rotated} = Operation.rotate(img, 90, background: [255, 255, 255])\n\n# Smart thumbnail (preserves important features)\n{:ok, thumb} = Operation.thumbnail(\"large.jpg\", 300, size: :VIPS_SIZE_DOWN, crop: :VIPS_INTERESTING_ATTENTION)\n```\n\n### Web Optimization\n```elixir\n# Convert to WebP with quality optimization\n:ok = Image.write_to_file(img, \"output.webp\", Q: 80, effort: 4)\n\n# Create progressive JPEG with metadata stripped\n:ok = Image.write_to_file(img, \"output.jpg\", interlace: true, strip: true, Q: 85)\n\n# Generate multiple formats\n:ok = Image.write_to_file(img, \"photo.avif\", Q: 60)\n:ok = Image.write_to_file(img, \"photo.webp\", Q: 80)\n:ok = Image.write_to_file(img, \"photo.jpg\", Q: 85)\n```\n\n### Filters \u0026 Effects\n```elixir\n# Blur\n{:ok, blurred} = Operation.gaussblur(img, 3.0)\n\n# Sharpen\n{:ok, sharp} = Operation.sharpen(img, sigma: 1.0)\n\n# Grayscale\n{:ok, bw} = Operation.colourspace(img, :VIPS_INTERPRETATION_B_W)\n```\n\n### Advanced Usage\n```elixir\n# Smart thumbnail preserving important features\n{:ok, thumb} = Operation.thumbnail(\n  \"large.jpg\",\n  300,\n  size: :VIPS_SIZE_DOWN, # only downsize, it will just copy if asked to upsize\n  crop: :VIPS_INTERESTING_ATTENTION\n)\n\n# Process image stream on the fly\n{:ok, image} =\n  File.stream!(\"large_photo.jpg\", [], 65_536)\n  |\u003e Image.new_from_enum()\n# use `image` for further operations...\n\n# Stream image to S3\n:ok =\n  Image.write_to_stream(image, \".png\")\n  |\u003e Stream.each(\u0026upload_chunk_to_s3/1)\n  |\u003e Stream.run()\n```\n\n\u003c!-- TODO: Would be great to add examples for: --\u003e\n\u003c!-- - Watermarking --\u003e\n\u003c!-- - Image composition --\u003e\n\u003c!-- - Batch processing --\u003e\n\u003c!-- - Text overlay --\u003e\n\n## Performance\n\nLibvips very fast and uses very little memory. See the detailed [benchmark](https://github.com/libvips/libvips/wiki/Speed-and-memory-use). Resizing an image is typically 4x-5x faster than using the quickest ImageMagick settings. It can also work with very large images without completely loading them to the memory.\n\n## Installation\n\nAdd Vix to your dependencies:\n\n```elixir\ndef deps do\n  [\n    {:vix, \"~\u003e x.x.x\"}\n  ]\nend\n```\n\nThat's it! Vix includes pre-built binaries for MacOS \u0026 Linux.\n\n## Advanced Setup\n\nWant to use your system's libvips? Set before compilation:\n\n```bash\nexport VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS\n```\n\nSee [libvips installation guide](https://www.libvips.org/install.html) for more details.\n\n\n## Documentation \u0026 Resources\n\n- [Complete API Documentation](https://hexdocs.pm/vix/)\n- [Interactive Introduction (Livebook)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fakash-akya%2Fvix%2Fblob%2Fmaster%2Flivebooks%2Fintroduction.livemd)\n- [Creating Rainbow Effects (Livebook)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fakash-akya%2Fvix%2Fblob%2Fmaster%2Flivebooks%2Frainbow.livemd)\n- [Auto Document Rotation (Livebook)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fakash-akya%2Fvix%2Fblob%2Fmaster%2Flivebooks%2Fauto_correct_rotation.livemd)\n- [Picture Language from SICP (Livebook)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fakash-akya%2Fvix%2Fblob%2Fmaster%2Flivebooks%2Fpicture-language.livemd)\n\n## FAQ\n\n### Should I use Vix or Image?\n\n[Image](https://github.com/kipcole9/image) is a library which builds on top of Vix.\n\n- Use [Image](https://github.com/kipcole9/image) when you need:\n  - A more Elixir-friendly API for common operations\n  - Higher-level operations like Blurhash\n  - Simple, chainable functions for common operations\n\n- Use Vix directly when you need:\n  - Advanced VIPS features and fine-grained control\n  - Complex image processing pipelines\n  - Direct libvips performance and capabilities\n  - Lesser dependencies\n\n### What image formats are supported?\nOut of the box: JPEG, PNG, WEBP, TIFF, SVG, HEIF, GIF, and more. Need others? Just install libvips with the required libraries!\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakash-akya%2Fvix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakash-akya%2Fvix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakash-akya%2Fvix/lists"}