Skip to main content

NvJpeg - Python

Require

  • nvjpeg
  • cuda >= 10.2
  • numpy >= 1.7
  • python >= 3.6
  • gcc >= 7.5
  • make >= 4.1

System

Linux(x86, x86_64) Nvidia Jetson OS

Install

pip install pynvjpeg

Usage

0. Init PyNvJpeg

from nvjpeg import NvJpeg
nj = NvJpeg()

1. Use PyNvJpeg

Read Jpeg File to Numpy

img = nj.read("_JPEG_FILE_PATH_")
# like cv2.imread("_JPEG_FILE_PATH_")

Write Numpy to Jpeg File

nj.write("_JPEG_FILE_PATH_", img)
# or nj.write("_JPEG_FILE_PATH_", quality)
# int quality default 70, mean jpeg quality
# like cv2.imwrite("_JPEG_FILE_PATH_", img)

Decode Jpeg bytes in variable

img = nj.decode(jpeg_bytes)
# like cv2.imdecode(variable)

Encode image numpy array to bytes

jpeg_bytes = nj.encode(img)
# or with jpeg quality
# jpeg_bytes = nj.encode(img, 70)
# int quality default 70, mean jpeg quality

# like cv2.imencode(".jpg", variable)[1]

Release files for pynvjpeg 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynvjpeg 0.0.13
File Size Uploaded
pynvjpeg-0.0.13.tar.gz 11.3 kB Details

Release files / pynvjpeg-0.0.13.tar.gz

Download URL pynvjpeg-0.0.13.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d2d84f26395178414c325a18dd83f7fa0fe83b14d9d0b0e8bc0adb7648738360
BLAKE2b-256 checksum
How to use checksums
4ad3cdafe2fdebae3a7e219e8db0ddc8c9f67ee72a466dc095f56b12c0280252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.0.13 This release

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page