{"id":18897771,"url":"https://github.com/zurutech/pillow-resize","last_synced_at":"2025-04-15T02:11:49.982Z","repository":{"id":43174307,"uuid":"399732046","full_name":"zurutech/pillow-resize","owner":"zurutech","description":"Porting of Pillow resize method in C++ and OpenCV.","archived":false,"fork":false,"pushed_at":"2023-03-22T17:33:20.000Z","size":1613,"stargazers_count":132,"open_issues_count":4,"forks_count":16,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-15T02:11:44.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zurutech.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}},"created_at":"2021-08-25T07:39:26.000Z","updated_at":"2025-04-06T01:08:10.000Z","dependencies_parsed_at":"2024-11-08T08:51:24.017Z","dependency_job_id":null,"html_url":"https://github.com/zurutech/pillow-resize","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/zurutech%2Fpillow-resize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fpillow-resize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fpillow-resize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fpillow-resize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurutech","download_url":"https://codeload.github.com/zurutech/pillow-resize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991557,"owners_count":21194894,"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-11-08T08:39:30.619Z","updated_at":"2025-04-15T02:11:49.957Z","avatar_url":"https://github.com/zurutech.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pillow Resize\n\n## Table of Contents \n\n- [Description](#description)\n- [Compilation](#compilation)\n- [Installation](#installation)\n- [Usage](#usage)\n\n\n## Description\n\n`PillowResize` library is a C++ porting of the resize method from the [Pillow](https://github.com/python-pillow/Pillow) python library.\n\nIt is written in C++ using [OpenCV](https://opencv.org/) for matrix support\n\nThe main difference with respect to the [`resize`](https://docs.opencv.org/4.5.2/da/d54/group__imgproc__transform.html#ga47a974309e9102f5f08231edc7e7529d) method of OpenCV is the use of an anti aliasing filter, that is missing in OpenCV and could introduce some artifacts, in particular with strong down-sampling.\n\nSee also blog.\n\n\n### Requirements\n\nThe only requirement is `OpenCV`, so install it from your package manager.\n\n\n## Compilation\n\n```bash\ngit clone --recurse https://github.com/zurutech/pillow-resize.git\ncd pillow-resize\ngit submodule update --init --recursive\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\n```\n\n### Test\nIf you want to run also the tests, you need to install [`gtest`](https://github.com/google/googletest).\n\n```bash\ncmake -DBUILD_TESTS=ON ..\nmake\nmake test\n```\n\nThe tests are based on a pixelwise comparison between the images resized using Pillow from Python and the images created with this library.\n\n## Installation\n\nTo install `PillowResize` as a package ensure that you have `OpenCV` installed system-wide, then simply compile and install.\n\n```bash\nmkdir build \u0026\u0026 cd build\ncmake ..\nsudo make install\n```\n\n### Uninstall\n\nTo uninstall `PillowResize` and all the things it brings with it simply run\n\n```bash\ncd build\nsudo make uninstall\n```\n\n\n## Usage\n\nThe library uses `cmake`, hence this library can be added as a subdirectory and built together with your project or use the installed package as a normal CMake package.\n\n### Installed package\n\n```cmake\nfind_package(PillowResize REQUIRED)\n```\n\n### Subdirectory\n\n```cmake\nadd_subdirectory(path-to-subdir)\n```\n\n### Link\n\n```cmake\ntarget_link_libraries(your-target PUBLIC PillowResize)\n```\n\nThe library defines also the variable `PILLOWRESIZE_LIBS`, so you can replace `PillowResize` in the command above with `\"${PILLOWRESIZE_LIBS}\"`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurutech%2Fpillow-resize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurutech%2Fpillow-resize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurutech%2Fpillow-resize/lists"}