{"id":13573938,"url":"https://github.com/UsingNet/nvjpeg-python","last_synced_at":"2025-04-04T13:30:34.582Z","repository":{"id":45226331,"uuid":"334122746","full_name":"UsingNet/nvjpeg-python","owner":"UsingNet","description":"nvjpeg for python","archived":false,"fork":false,"pushed_at":"2023-01-27T14:57:44.000Z","size":439,"stargazers_count":98,"open_issues_count":18,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-06T10:11:28.811Z","etag":null,"topics":["nvjpeg","python"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UsingNet.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}},"created_at":"2021-01-29T11:17:35.000Z","updated_at":"2025-02-11T09:35:23.000Z","dependencies_parsed_at":"2023-02-15T10:10:55.787Z","dependency_job_id":null,"html_url":"https://github.com/UsingNet/nvjpeg-python","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/UsingNet%2Fnvjpeg-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UsingNet%2Fnvjpeg-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UsingNet%2Fnvjpeg-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UsingNet%2Fnvjpeg-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UsingNet","download_url":"https://codeload.github.com/UsingNet/nvjpeg-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247184858,"owners_count":20897844,"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":["nvjpeg","python"],"created_at":"2024-08-01T15:00:43.836Z","updated_at":"2025-04-04T13:30:31.829Z","avatar_url":"https://github.com/UsingNet.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"NvJpeg - Python\n---------------------------\n\n## Require\n* nvjpeg\n* cuda \u003e= 10.2\n* numpy \u003e= 1.7\n* python \u003e= 3.6\n* gcc \u003e= 7.5\n* make \u003e= 4.1\n\n## System\n* Linux\n* Windows\n* Nvidia Jetson OS\n\n## Install\n```shell\npip install pynvjpeg\n```\n\n## Usage\n\n### 0. Init PyNvJpeg\n```python\nfrom nvjpeg import NvJpeg\nnj = NvJpeg()\n```\n\n### 1. Use PyNvJpeg\n\n#### Read Jpeg File to Numpy\n```python\nimg = nj.read(\"_JPEG_FILE_PATH_\")\n# like cv2.imread(\"_JPEG_FILE_PATH_\")\n```\n\n#### Write Numpy to Jpeg File\n```python\nnj.write(\"_JPEG_FILE_PATH_\", img)\n# or nj.write(\"_JPEG_FILE_PATH_\", quality)\n# int quality default 70, mean jpeg quality\n# like cv2.imwrite(\"_JPEG_FILE_PATH_\", img)\n```\n\n#### Decode Jpeg bytes in variable\n```python\nimg = nj.decode(jpeg_bytes)\n# like cv2.imdecode(variable)\n```\n\n#### Encode image numpy array to bytes\n```python\njpeg_bytes = nj.encode(img)\n# or with jpeg quality\n# jpeg_bytes = nj.encode(img, 70)\n# int quality default 70, mean jpeg quality\n\n# like cv2.imencode(\".jpg\", variable)[1]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUsingNet%2Fnvjpeg-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUsingNet%2Fnvjpeg-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUsingNet%2Fnvjpeg-python/lists"}