{"id":18507647,"url":"https://github.com/daddye/vips","last_synced_at":"2025-04-05T10:08:34.796Z","repository":{"id":20261277,"uuid":"23534175","full_name":"DAddYE/vips","owner":"DAddYE","description":"Go Bindings for Vips (a super fast image processor)","archived":false,"fork":false,"pushed_at":"2017-03-07T21:55:29.000Z","size":31954,"stargazers_count":460,"open_issues_count":17,"forks_count":51,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-05T10:08:27.922Z","etag":null,"topics":["go","imagemagick","jpeg","libvips","vips"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DAddYE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-01T07:29:44.000Z","updated_at":"2025-03-05T10:54:05.000Z","dependencies_parsed_at":"2022-07-17T01:15:58.008Z","dependency_job_id":null,"html_url":"https://github.com/DAddYE/vips","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fvips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fvips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fvips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fvips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DAddYE","download_url":"https://codeload.github.com/DAddYE/vips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318744,"owners_count":20919484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","imagemagick","jpeg","libvips","vips"],"created_at":"2024-11-06T15:10:30.932Z","updated_at":"2025-04-05T10:08:34.773Z","avatar_url":"https://github.com/DAddYE.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Vips for go\n\nThis package is powered by the blazingly fast [libvips](https://github.com/jcupitt/libvips) image\nprocessing library, originally created in 1989 at Birkbeck College and currently maintained by \n[JohnCupitt](https://github.com/jcupitt).\n\nThis is a loosely port of [sharp](https://github.com/lovell/sharp) an awesome module for node.js\nbuilt by [Lovell Fuller](https://github.com/lovell)\n\nThe typical use case for this high speed package is to convert large images of many formats\nto smaller, web-friendly JPEG, PNG images of varying dimensions.\n\nThe performance of JPEG resizing is typically 8x faster than ImageMagick and GraphicsMagick, based\nmainly on the number of CPU cores available.\n\nWhen generating JPEG output all metadata is removed and Huffman tables optimised without having to\nuse separate command line tools like [jpegoptim](https://github.com/tjko/jpegoptim) and\n[jpegtran](http://jpegclub.org/jpegtran/).\n\n## Installation\n\n    go get github.com/daddye/vips\n\n* [libvips](https://github.com/jcupitt/libvips) v7.38.5+\n\n_libvips_ can take advantage of [liborc](http://code.entropywave.com/orc/) if present.\n\n### Install libvips on Mac OS\n\n    brew install homebrew/science/vips --without-fftw --without-libexif --without-libgsf \\\n      --without-little-cms2 --without-orc --without-pango --without-pygobject3 \\\n      --without-gobject-introspection --without-python\n\n### Install libvips on Linux\n\nCompiling from source is recommended:\n\n    sudo apt-get install automake build-essential git gobject-introspection \\\n      libglib2.0-dev libjpeg-turbo8-dev libpng12-dev gtk-doc-tools\n    git clone https://github.com/jcupitt/libvips.git\n    cd libvips\n    ./bootstrap.sh\n    ./configure --enable-debug=no --without-python --without-fftw --without-libexif \\\n      --without-libgf --without-little-cms --without-orc --without-pango --prefix=/usr\n    make\n    sudo make install\n    sudo ldconfig\n\n## Usage\n\nYou can use package from the command line (`go install github.com/daddye/vips/vips-cmd`):\n\n    vips-cmd -file test.jpg -width 400 -height 600 \u003e /tmp/test.jpg\n\nOr simply importing the package and then:\n\n```go\noptions := vips.Options{\n\tWidth:        800,\n\tHeight:       600,\n\tCrop:         false,\n\tExtend:       vips.EXTEND_WHITE,\n\tInterpolator: vips.BILINEAR,\n\tGravity:      vips.CENTRE,\n\tQuality:      95,\n}\nf, _ := os.Open(\"/tmp/test.jpg\")\ninBuf, _ := ioutil.ReadAll(f)\nbuf, err := vips.Resize(inBuf, options)\nif err != nil {\n\tfmt.Fprintln(os.Stderr, err)\n\treturn\n}\n// do some with your resized image `buf`\n```\n\n## Performance\n\nTest by @lovell\n\n### Test environment\n\n* Intel Xeon [L5520](http://ark.intel.com/products/40201/Intel-Xeon-Processor-L5520-8M-Cache-2_26-GHz-5_86-GTs-Intel-QPI) 2.27GHz 8MB cache\n* Ubuntu 13.10\n* libvips 7.38.5\n\n### The contenders\n\n* [imagemagick-native](https://github.com/mash/node-imagemagick-native) - Supports Buffers only and blocks main V8 thread whilst processing.\n* [imagemagick](https://github.com/rsms/node-imagemagick) - Supports filesystem only and \"has been unmaintained for a long time\".\n* [gm](https://github.com/aheckmann/gm) - Fully featured wrapper around GraphicsMagick.\n* [sharp](https://github.com/lovell/sharp) - Caching within libvips disabled to ensure a fair comparison.\n\n### The task\n\nDecompress a 2725x2225 JPEG image, resize and crop to 720x480, then compress to JPEG.\n\n### Results\n\n| Module                | Input  | Output | Ops/sec | Speed-up |\n| :-------------------- | :----- | :----- | ------: | -------: |\n| imagemagick-native    | buffer | buffer |    0.97 |        1 |\n| imagemagick           | file   | file   |    2.49 |      2.6 |\n| gm                    | buffer | file   |    3.72 |      3.8 |\n| gm                    | buffer | buffer |    3.80 |      3.9 |\n| gm                    | file   | file   |    3.67 |      3.8 |\n| gm                    | file   | buffer |    3.67 |      3.8 |\n| sharp                 | buffer | file   |   13.62 |     14.0 |\n| sharp                 | buffer | buffer |   12.43 |     12.8 |\n| sharp                 | file   | file   |   13.02 |     13.4 |\n| sharp                 | file   | buffer |   11.15 |     11.5 |\n| sharp +sharpen        | file   | buffer |   10.26 |     10.6 |\n| sharp +progressive    | file   | buffer |    9.44 |      9.7 |\n| sharp +sequentialRead | file   | buffer |   11.94 |     12.3 |\n\nYou can expect much greater performance with caching enabled (default) and using 16+ core machines.\n\n## Thanks\n\nThis module would never have been possible without the help and code contributions of the following people:\n\n* [Lovell Fuller](https://github.com/lovell)\n* [John Cupitt](https://github.com/jcupitt)\n* [Pierre Inglebert](https://github.com/pierreinglebert)\n* [Jonathan Ong](https://github.com/jonathanong)\n* [Chanon Sajjamanochai](https://github.com/chanon)\n* [Juliano Julio](https://github.com/julianojulio)\n\n## License\n\nCopyright (C) 2014 Davide D'Agostino\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaddye%2Fvips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaddye%2Fvips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaddye%2Fvips/lists"}