Skip to main content

NvJpeg - Python

Require

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

Install

pip install pynvjpeg

Usage

#!/usr/bin/env python3

from nvjpeg import NvJpeg 

# read file
fp = open("input-image.jpg", "rb")
jpegData = fp.read()
fp.close()

# decode
nj = NvJpeg()
img_np = nj.decode(jpegData)

# use opencv show numpy image data
cv2.imshow("Demo", img_np)
cv2.waitKey(0)

# encode numpy image data
jpg = nj.encode(img_np)

# write file
fp = open("output-image.jpg", "wb")
fp.write(jpg)
fp.close()

Release files for pynvjpeg 0.0.6

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.6
File Size Uploaded
pynvjpeg-0.0.6.tar.gz 5.0 kB Details

Release files / pynvjpeg-0.0.6.tar.gz

Download URL pynvjpeg-0.0.6.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7c48c8ff8d4270fe00b39479448bad063a35895369a423594ed27123e311a53b
BLAKE2b-256 checksum
How to use checksums
e2e5ab383e862f8cd3a3add91a7096986ccd1653e9340523e1891a0d1610d13d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.9

Release history Release notifications | RSS feed

0.0.13

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

This release

0.0.6 This release

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