{"id":16743989,"url":"https://github.com/zshipko/ezimage","last_synced_at":"2025-03-16T01:12:47.753Z","repository":{"id":79820939,"uuid":"208891064","full_name":"zshipko/ezimage","owner":"zshipko","description":"bare-bones image I/O library","archived":false,"fork":false,"pushed_at":"2021-05-18T04:18:14.000Z","size":654,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T14:08:14.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zshipko.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-16T20:23:20.000Z","updated_at":"2021-05-18T04:18:16.000Z","dependencies_parsed_at":"2023-03-06T11:30:20.622Z","dependency_job_id":null,"html_url":"https://github.com/zshipko/ezimage","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/zshipko%2Fezimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zshipko%2Fezimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zshipko%2Fezimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zshipko%2Fezimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zshipko","download_url":"https://codeload.github.com/zshipko/ezimage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809884,"owners_count":20351407,"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":[],"created_at":"2024-10-13T01:42:08.216Z","updated_at":"2025-03-16T01:12:47.724Z","avatar_url":"https://github.com/zshipko.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ezimage - bare-bones C image I/O\n\nThe goal of `ezimage` is to provide a simple interface for reading and writing images while allowing for different types of images to be supported by selecting a different backend.\n\n## Backends\n\n- `stb_image`\n  * Requires `libtiff`\n  * Based on [stb_image](https://github.com/nothings/stb), [TinyEXR](https://github.com/syoyo/tinyexr) and libtiff\n  * Read: **PNG**, **JPEG**, **GIF**, **HDR**, **TGA**, **BMP**, **PSD**, **EXR**, **TIFF**\n  * Write: **PNG**, **JPEG**, **HDR**, **EXR**, **TIFF**\n- `openimageio`\n  * Based on [OpenImageIO](https://github.com/OpenImageIO/oiio)\n  * `libOpenImageIO` must be installed (for example, `libopenimageio-dev` on Debian based distros)\n  * Read: **PNG**, **JPEG**, **TIFF**, **GIF**, **HDR**, **TGA**, **BMP**, **RAW**, **OpenEXR**, **DPX**, **PSD**, ...\n  * Write: **PNG**, **JPEG**, **TIFF**, **GIF**, **HDR**, **TGA**, **BMP**, **OpenEXR**, **DPX**, ...\n\n## Building\n\n```shell\n$ make backend=$BACKEND\n```\n\nTo install:\n\n```shell\n$ sudo make install\n```\n\nYou can use pkg-config to include `ezimage` in your project: `pkg-config --cflags --libs ezimage`\n\n## API\n\nThere are only 4 functions defined by `libezimage`: `ezimage_imread` for reading image, `ezimage_imwrite` for writing images, `ezimage_alloc` for allocating new image data and `ezimage_free` for freeing image data.\n\n`ezimage_alloc` and `ezimage_free` are implemented by each backend depending on their memory needs. For example, in Rust, this will return a pointer to `Vec` data, which will later be dropped when calling `ezimage_free`, but in most cases they simply wrap `malloc`/`free`.\n\n- `ezimage_imread(filename, requested_type, output_size) -\u003e pixels`\n  * The `requested_type` is a suggestions, however the output data type may differ. Always check the output type to ensure it is the type you're expecting\n  * Returns `NULL` when the image can't be read\n  * The pixel data returned by `ezimage_imread` should be freed using `ezimage_free`\n- `ezimage_imwrite(filename, data, image_size) -\u003e bool`\n  * Returns `true` when the image has been written, `false` otherwise\n- `ezimage_alloc(shape)`\n  * Returns new image data for the corresponding shape\n- `ezimage_free(data, image_size)`\n  * Free image data allocated by `ezimage_imread`\n\nSee `src/ezimage.h`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzshipko%2Fezimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzshipko%2Fezimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzshipko%2Fezimage/lists"}