{"id":13574610,"url":"https://github.com/snapwire-media/arion","last_synced_at":"2025-04-04T15:31:32.792Z","repository":{"id":85778117,"uuid":"43269509","full_name":"snapwire-media/arion","owner":"snapwire-media","description":"Fast thumbnail creation and image metadata extraction","archived":false,"fork":false,"pushed_at":"2019-03-14T21:22:49.000Z","size":3666,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":21,"default_branch":"develop","last_synced_at":"2024-11-05T09:44:56.505Z","etag":null,"topics":["exif","exiv2","icc-profile","image-processing","iptc","lambda","libraw","opencv","raw","raw-image","thumbnails","watermark"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snapwire-media.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-09-27T23:12:38.000Z","updated_at":"2023-08-22T21:01:17.000Z","dependencies_parsed_at":"2023-03-06T18:30:18.815Z","dependency_job_id":null,"html_url":"https://github.com/snapwire-media/arion","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapwire-media%2Farion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapwire-media%2Farion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapwire-media%2Farion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapwire-media%2Farion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snapwire-media","download_url":"https://codeload.github.com/snapwire-media/arion/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247202799,"owners_count":20900842,"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":["exif","exiv2","icc-profile","image-processing","iptc","lambda","libraw","opencv","raw","raw-image","thumbnails","watermark"],"created_at":"2024-08-01T15:00:53.001Z","updated_at":"2025-04-04T15:31:27.778Z","avatar_url":"https://github.com/snapwire-media.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Arion [![Build Status](https://travis-ci.org/snapwire-media/arion.svg)](https://travis-ci.org/snapwire-media/arion)\n\u003cimg align=\"right\" style=\"margin-left:4px;\" src=\"https://raw.githubusercontent.com/wiki/snapwire-media/arion/images/arion-logo.png?token=ABLvVTS8ATmDqkb6_Al5kWmLIbUPJraeks5WLDi5wA%3D%3D\"\u003e\nArion extracts metadata and creates beautiful thumbnails from your images.\n\n* Batch generate thumbnails with one call\n* Apply output sharpening on each thumbnail\n* Resize with height priority, width priority, or square crop\n* Apply user-defined watermark\n* Get md5 hash of pixel data\n* Raw images support\n\nEach parameter is completely configurable via a JSON input and **Arion** can be called through any language that can execute shell commands. See the **[API Documentation](../../wiki/API-Documentation)** for more details.\n\n## Why Arion?\nWhile there are several tools available to generate thumbnails and read image metadata here's what Arion has to offer:\n* **Performance** - use a single command to batch generate thumbnails\n* **Aesthetics** - independently control output sharpening and JPEG quality on each thumbnail\n* **Functionality** - easily apply watermarks and preserve image metadata on thumbnails\n* **Compatability** - call from anything that executes shell commands (see examples in **[Python](../../wiki/Examples#python)**, **[PHP](../../wiki/Examples#php)**, **[Ruby](../../wiki/Examples#ruby)**, **[Bash](../../wiki/Examples#shell)**)\n* **Extensibility** - use the modular operation framework and OpenCV to process images in new ways\n\n## Installation\nCurrently this tool needs to be compiled from source to work on your host system. Install instructions are for Ubuntu, but can be easily modified to work on any *nix-based system. For Mac OS X see the following [instructions](../../wiki/Installation#mac-os-x). \n\n**Requirements**\n* CMake 3.1+\n* EXIV2 0.26+\n* LibRaw 0.19+\n* OpenCV 3.4+\n* Boost 1.46+\n  * core \n  * program options \n  * timer \n  * filesystem \n  * system\n\n**Install dependencies**\n\n***Ubuntu***\n```bash\nsudo apt-get install cmake wget unzip libexpat1-dev zlib1g-dev libssl-dev build-essential libpng-dev libpng automake libtool\n```\n\n***Amazon linux***\n```bash\nsudo yum install cmake wget unzip expat-devel zlib-devel zlib-static openssl-devel openssl-static make glibc-devel gcc gcc-c++ automake libtool\n```\n\nFor old version on Amazon linux upgrade cmake to version 3.1+\n```bash\nsudo yum install cmake3 --enablerepo=epel\n```\nThen for rest of installation guide replace \"cmake\" to \"cmake3\" command\n\n**Install EXIV2**\n\nDownload the latest version from http://www.exiv2.org/download.html (or use wget command below)\n\n```bash\ncd ~/\nwget https://github.com/Exiv2/exiv2/archive/v0.26.zip\nunzip v0.26.zip\ncd exiv2-0.26\nmkdir build\ncd build\ncmake ../\n```\n\nCMake will tell you any dependencies you are missing\n\nNow build EXIV2 and install it into the system\n```bash\nmake\nsudo make install\n```\n\n**Install LibRaw**\n\nArion  support raw files via [libRaw](https://www.libraw.org/). Download latest version from https://www.libraw.org/download\n\n```bash\nwget https://github.com/LibRaw/LibRaw/archive/0.19.0.zip\nunzip 0.19.0.zip\ncd LibRaw-0.19.0/\nautoreconf --install\n./configure --disable-openmp\nmake\nsudo make install\n```\n\n\n**Install OpenCV**\n\nArion requires OpenCV 3.4+ which must be compiled from source.  Download the latest archive from http://opencv.org/downloads.html or use wget latest version\n\n```bash\nwget https://github.com/opencv/opencv/archive/3.4.1.zip\nunzip 3.4.1.zip\ncd opencv-3.4.1/\nmkdir build\ncd build\ncmake ..\nmake\nsudo make install\n```\n\nFor a more optimized/minimal OpenCV build use the following options. \nNOTE: This requires installation of [libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo).  \n\n```\ncmake -DBUILD_DOCS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF \\\n      -DBUILD_WITH_DEBUG_INFO=OFF -DBUILD_opencv_apps=OFF \\\n      -DBUILD_opencv_calib3d=OFF -DBUILD_opencv_video=OFF \\\n      -DBUILD_opencv_videoio=OFF -DBUILD_opencv_java=OFF \\\n      -DWITH_JPEG=ON -DBUILD_JPEG=OFF \\\n      -DJPEG_INCLUDE_DIR=/opt/libjpeg-turbo/include/ \\\n      -DJPEG_LIBRARY=/opt/libjpeg-turbo/lib64/libjpeg.a \\\n      -DENABLE_SSSE3=ON -DENABLE_SSE41=ON -DENABLE_SSE42=ON \\\n      -DENABLE_AVX=ON ..\n```\n\n**Install Boost**\n\nBoost version 1.46+ is required to build Arion.  This is not a particularly new version so the package maintainers version will usually work.\n\n***Ubuntu***\n```bash\nsudo apt-get install libboost-dev libboost-program-options-dev libboost-timer-dev libboost-filesystem-dev libboost-system-dev\n```\n\n***Amazon linux***\n```bash\nsudo yum install boost-devel boost-program-options boost-timer boost-filesystem boost-system boost-static\n```\n\n**Build Arion**\n\nThis will create the final executable. You will need to create a new build directory and run CMake to generate the makefile.  CMake will let you know if any dependencies are missing.  \n\n```bash\nmkdir build\ncd build\ncmake ../src/\nmake\n```\n\n**Run Examples**\n\nThere are two example images provided and a wide range of example operations via a shell script. \n\n```bash\ncd examples\n./examples.sh\n```\n\nThe output will look like this\n\n```bash\nRunning example operations on horizontal image\n\n{\n  \"result\" : true,\n  \"time\" : 0.17,\n  \"height\" : 864,\n  \"width\" : 1296\n  ...\n```\n\n**Fingerprint generation (md5)**\n\nFingerprint generation is separated operation. For JSON like that\n```JSON\n{\n    \"input_url\": \"../examples/image-2-800-watermark.jpg\",\n    \"operations\": [\n        {\n            \"type\": \"fingerprint\",\n            \"params\": {\n                \"type\": \"md5\"\n            }\n        }\n    ]\n}\n```\n\nOutput will be:\n```JSON\n{\n    \"height\": 1000,\n    \"width\": 762,\n    \"info\": [\n        {\n            \"type\": \"fingerprint\",\n            \"result\": true,\n            \"md5\": \"5e1c56695ee01492ee3976f86a8b7f68\"\n        }\n    ],\n    \"result\": true,\n    \"total_operations\": 1,\n    \"failed_operations\": 0\n}\n\n```\n\n\n# Static build\n\nSometimes you need to have a 'portable' version of Arion.\nFor example to use it with AWS Lambda or services like that.\nGiven services only allow to deploy precompiled binary without any operation system modification.\nAt that case portable version is very usable.\n\nTo build static version of Arion you need to build evix2 and Opencv as a static version.\n\n**If you already build regular version of Arion**\n\nPlease clear cmake cache before to do a new build of Arion. You can remove content of build folders from arion,exiv2 and cmake.\n\n**Building**\n\nPlease follow main manual except cmake commands.\n\n***Exiv2***\n\n```bash\ncmake -DEXIV2_ENABLE_SHARED=OFF ..\n```\n\n***OpenCV***\n```bash\ncmake -DBUILD_SHARED_LIBS=OFF\n```\nBut you also can skip build on not necessary packages\n\n```bash\ncmake -DBUILD_DOCS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF \\\n      -DBUILD_WITH_DEBUG_INFO=OFF -DBUILD_opencv_apps=OFF \\\n      -DBUILD_opencv_calib3d=OFF -DBUILD_opencv_video=OFF \\\n      -DBUILD_opencv_videoio=OFF -DBUILD_opencv_java=OFF \\\n      -DENABLE_SSSE3=ON -DENABLE_SSE41=ON -DENABLE_SSE42=ON \\\n      -DENABLE_AVX=ON -DENABLE_AVX2=ON -DENABLE_FMA3=ON \\\n      -DBUILD_SHARED_LIBS=OFF ..\n```\n\n***Arion***\n```bash\ncmake -DARION_ENABLE_SHARED=OFF ../src/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapwire-media%2Farion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnapwire-media%2Farion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapwire-media%2Farion/lists"}