{"id":18513976,"url":"https://github.com/daddye/trez","last_synced_at":"2025-04-09T06:33:55.293Z","repository":{"id":23734762,"uuid":"27108281","full_name":"DAddYE/trez","owner":"DAddYE","description":"A fast image resizer","archived":false,"fork":false,"pushed_at":"2016-04-14T21:14:39.000Z","size":284,"stargazers_count":102,"open_issues_count":0,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-18T23:03:43.884Z","etag":null,"topics":[],"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-11-25T04:01:06.000Z","updated_at":"2023-10-15T18:41:10.000Z","dependencies_parsed_at":"2022-08-22T03:50:21.552Z","dependency_job_id":null,"html_url":"https://github.com/DAddYE/trez","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%2Ftrez","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Ftrez/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Ftrez/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Ftrez/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DAddYE","download_url":"https://codeload.github.com/DAddYE/trez/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223368298,"owners_count":17134293,"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-06T15:41:35.133Z","updated_at":"2024-11-06T15:41:35.702Z","avatar_url":"https://github.com/DAddYE.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# T-REZ\n\nA super fast image resizer build on top of opencv and jpeg-turbo.\n\n--\n\nThis package keeps a good quality of images however is built for _speed_.\nIt will strip out image informations like IPTC, EXIF, ColorSync profile, etc.\n\nThe benchmark below is just _illustrative_.\nThis code is derived form a production version that process (at peek) more than `1000 images/s` on a\nsingle machine.\n\n## Install\n\nYou need:\n\n- opencv\n- libjpeg (jpeg-turbo suggested)\n- libpng (optional if you want to read png files)\n\n### Macintosh\n\nIf you are on a mac and you have [brew](http://brew.sh) installed you can use [this\nformula](https://gist.githubusercontent.com/DAddYE/bd6a4819ec0bbb2efb0a/raw/opencv.rb)\n\n```\nbrew install https://gist.githubusercontent.com/DAddYE/bd6a4819ec0bbb2efb0a/raw/opencv.rb\n```\n\n### Linux\n\nInstall jpeg-turbo from sources:\n\n```\nlibjpeg-turbo-1.3.1$ ./configure --with-jpeg8 --with-pic \u0026\u0026 make \u0026\u0026 sudo make install\n```\n\nand then opencv with:\n\n```\nopencv-2.4.9$ cmake -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF \\\n-DJPEG_INCLUDE_DIR=/opt/libjpeg-turbo/include/ \\\n-DJPEG_LIBRARY=/opt/libjpeg-turbo/lib64/libturbojpeg.a -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF \\\n-DBUILD_opencv_java=OFF -DWITH_OPENEXR=ON -DWITH_QT=OFF -DWITH_TBB=OFF -DWITH_GSTREAMER=OFF \\\n-DWITH_GTK=OFF -DWITH_V4L=OFF -DBUILD_DOCS=OFF -DBUILD_NEW_PYTHON_SUPPORT=OFF  -DWITH_1394=OFF \\\n-DWITH_OPENCL=OFF -DENABLE_SSSE3=ON -DENABLE_SSE41=ON -DENABLE_SSE42=ON -DENABLE_AVX=ON -Wno-dev \\\n-DCMAKE_INSTALL_PREFIX=/usr\n```\n\nFinally:\n\n```\ngo get github.com/daddye/trez\n```\n\n## Features\n\nIt supports currently:\n\n- `fit` resize algo\n- `fill` resize algo\n- `background` color\n- `gravity` in case of `fit`\n- `quality` of jpeg (default `95`)\n\n## TODO\n\n- `trim` borders\n- `enlarge` option\n\n## Benchmarks\n\nOn:\n\n```\nArchitecture:          x86_64\nCPU op-mode(s):        32-bit, 64-bit\nByte Order:            Little Endian\nCPU(s):                24\nOn-line CPU(s) list:   0-23\nThread(s) per core:    2\nCore(s) per socket:    6\nSocket(s):             2\nNUMA node(s):          2\nVendor ID:             GenuineIntel\nCPU family:            6\nModel:                 45\nStepping:              7\nCPU MHz:               1895.270\nBogoMIPS:              3790.86\nVirtualization:        VT-x\nL1d cache:             32K\nL1i cache:             32K\nL2 cache:              256K\nL3 cache:              15360K\nNUMA node0 CPU(s):     0-5,12-17\nNUMA node1 CPU(s):     6-11,18-23\n```\n\nrunning 24 threads:\n\n```\n$ GOMAXPROCS=24 go run bench/main.go -file testdata/American_Dad.jpg -size 200x200 -workers 24\n\n## Resize speed of 14000 resizes\n  mean: 34.377864ms\n   min: 20.395457ms\n   max: 61.757311ms\n   %99: 55.475588ms\nstdDev: 4.781191ms\n  rate: 700.16 ops (images resized per second)\n```\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%2Ftrez","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaddye%2Ftrez","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaddye%2Ftrez/lists"}