{"id":28856160,"url":"https://github.com/cobusc/imagerl","last_synced_at":"2025-07-19T13:36:59.534Z","repository":{"id":7870098,"uuid":"9242581","full_name":"cobusc/imagerl","owner":"cobusc","description":"Image renderer and cacher in Erlang","archived":false,"fork":false,"pushed_at":"2014-05-02T12:51:52.000Z","size":3625,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-23T13:10:08.489Z","etag":null,"topics":["cacher","erlang","image","imagemagick","s3"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","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/cobusc.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":"2013-04-05T14:09:09.000Z","updated_at":"2019-07-15T20:55:28.000Z","dependencies_parsed_at":"2022-07-11T04:00:26.933Z","dependency_job_id":null,"html_url":"https://github.com/cobusc/imagerl","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/cobusc/imagerl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobusc%2Fimagerl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobusc%2Fimagerl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobusc%2Fimagerl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobusc%2Fimagerl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cobusc","download_url":"https://codeload.github.com/cobusc/imagerl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobusc%2Fimagerl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260852153,"owners_count":23072605,"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":["cacher","erlang","image","imagemagick","s3"],"created_at":"2025-06-20T00:11:21.592Z","updated_at":"2025-07-19T13:36:59.523Z","avatar_url":"https://github.com/cobusc.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imagerl [![Build Status](https://travis-ci.org/cobusc/imagerl.png?branch=master)](https://travis-ci.org/cobusc/imagerl)\n\nImage renderer and cacher in Erlang. It supports:\n* resizing based on the device size (using WURFL Cloud to perform lookups),\n* image convertion using the `convert` utility provided by ImageMagick,\n* serving of locally hosted images using the `file://\u003cpath_to_file\u003e` scheme, and\n* serving of Amazon S3 (privately) hosted images using the `s3://\u003cbucket\u003e/\u003ckey\u003e` scheme, which builds the required signed URL.\n\nQuick usage guide\n=================\n\nCache and serve an image\n------------------------\nIf the image is located at \"http://www.google.co.za/images/srpr/logo3w.png\", make the following call:\n```\nhttp://localhost:8000/render?url=http%3A%2F%2Fwww.google.co.za%2Fimages%2Fsrpr%2Flogo3w.png\n```\nThe image will be retrieved, cached and served the first time it is request. Thereafter it will simply be served from the cache.\n\nNote that:\n* Local files can be served using the \"file://\" scheme. \n* Files hosted on Amazon S3 can be served using the `s3://` scheme. \n* Source image caching can be disabled in the config file if necessary.\n\nRestrict the width or height\n----------------------------\nIf you require the image to have a restricted width or height, it can be specified:\n```\nhttp://localhost:8000/render?url=http%3A%2F%2Fwww.google.co.za%2Fimages%2Fsrpr%2Flogo3w.png\u0026width=100\n```\nor\n```\nhttp://localhost:8000/render?url=http%3A%2F%2Fwww.google.co.za%2Fimages%2Fsrpr%2Flogo3w.png\u0026height=100\n```\nThe aspect ratio will be preserved in this case.\n\nThe `width` or `height` values may be set to `wurfl`, in which case a WURFL lookup will be performed using the specified `ua` argument, or the detected device. Opera Mini's custom user agent header is supported.\n\nResize an image to specific dimensions\n--------------------------------------\nIf you need to resize the image to specific dimensions, specify BOTH the width and the height:\n```\nhttp://localhost:8000/render?url=http%3A%2F%2Fwww.google.co.za%2Fimages%2Fsrpr%2Flogo3w.png\u0026width=100\u0026height=100\n```\n\nAnnotate the image with text\n----------------------------\nText can be annotated diagonally across the image by adding \"annotation=\u003ctext\u003e\", e.g.\n```\nhttp://localhost:8000/render?url=http%3A%2F%2Fwww.google.co.za%2Fimages%2Fsrpr%2Flogo3w.png\u0026annotation=SAMPLE\n```\n\nDebugging\n---------\nFor debugging purposes the following additional arguments have been exposed:\n* `nocache` - Forces the imager to retrieve the specified image from the source and repopulate the cached copy, rather than use the cached copy.\n* `debug` - Enables detailed debug logging for the request.\n\n\nUser interface\n==============\n\nA graphical user interface is available at\n```\nhttp://localhost:8000/ui\n```\n\n\nNotes to self...\n================\n\nCheck out\n```\nhttp://www.imagemagick.org/Usage/annotating/\n```\n\nSome notes from the Imagick website relating to geometry specifications...\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003cth\u003esize\u003c/th\u003e\u003cth\u003eGeneral description (actual behavior can vary for different options and settings)\u003c/th\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003escale%\u003c/td\u003e\u003ctd\u003eHeight and width both scaled by specified percentage.\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003escale-x%xscale-y%\u003c/td\u003e\u003ctd\u003eHeight and width individually scaled by specified percentages. (Only one % symbol needed.)\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003ewidth\u003c/td\u003e\u003ctd\u003eWidth given, height automagically selected to preserve aspect ratio.\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003exheight\u003c/td\u003e\u003ctd\u003eHeight given, width automagically selected to preserve aspect ratio.\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003ewidthxheight\u003c/td\u003e\u003ctd\u003eMaximum values of height and width given, aspect ratio preserved.\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003ewidthxheight^\u003c/td\u003e\u003ctd\u003eMinimum values of width and height given, aspect ratio preserved.\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003ewidthxheight!\u003c/td\u003e\u003ctd\u003eWidth and height emphatically given, original aspect ratio ignored.\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003ewidthxheight\u0026gt;\u003c/td\u003e\u003ctd\u003eShrinks an image with dimension(s) larger than the corresponding width and/or height argument(s).\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003ewidthxheight\u0026lt;\u003c/td\u003e\u003ctd\u003eEnlarges an image with dimension(s) smaller than the corresponding width and/or height argument(s).\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003earea@\u003c/td\u003e\u003ctd\u003eResize image to have specified area in pixels. Aspect ratio is preserved.\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobusc%2Fimagerl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcobusc%2Fimagerl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobusc%2Fimagerl/lists"}