{"id":24744,"library":"turbojpeg","title":"TurboJPEG","description":"Python bindings for libjpeg-turbo using pybind11, providing fast JPEG compression and decompression with access to lossless crop/scale operations. Current version 0.0.2.post1, requires Python >=3.7. Development is slow with only a few releases.","status":"active","version":"0.0.2.post1","language":"python","source_language":"en","source_url":"https://github.com/Dobatymo/turbojpeg-python","tags":["jpeg","libjpeg-turbo","image","compression"],"install":[{"cmd":"pip install turbojpeg","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Dynamic library required for binary wheels not provided on all platforms","package":"libjpeg-turbo","optional":true}],"imports":[{"wrong":"from turbojpeg import TurboJPEG","symbol":"TurboJPEG","correct":"import turbojpeg"}],"quickstart":{"code":"from turbojpeg import TurboJPEG\nimport os\n\n# Initialize TurboJPEG\njpeg = TurboJPEG()\n\n# Read JPEG file and decompress\ninput_file = 'input.jpg'\nwith open(input_file, 'rb') as f:\n    jpeg_data = f.read()\nimg = jpeg.decode(jpeg_data)\n# img is a numpy array (height, width, channels)\n\n# Compress back to JPEG\noutput_file = 'output.jpg'\nwith open(output_file, 'wb') as f:\n    f.write(jpeg.encode(img))\n","lang":"python","description":"Basic JPEG decode and encode using TurboJPEG."},"warnings":[{"fix":"Pin version or monitor for updates.","message":"The package version 0.0.2.post1 is very early and may have API changes without notice. Not recommended for production.","severity":"gotcha","affected_versions":"<1.0"},{"fix":"Install libjpeg-turbo via system package manager (e.g., apt install libjpeg-turbo8-dev) or use Docker.","message":"Platform compatibility: binary wheels are not provided for all platforms (e.g., aarch64, manylinux2014). You may need to install libjpeg-turbo system-wide or build from source.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure numpy and array handling match expected layout.","message":"The 'decode' method returns a numpy array with HWC format (height, width, channels). Some users expect CHW.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.0.2':24 '3.7':28 'access':17 'bind':3 'compress':13,42 'crop/scale':20 'current':22 'decompress':15 'develop':29 'fast':11 'imag':41 'jpeg':12,37 'libjpeg':6,39 'libjpeg-turbo':5,38 'lossless':19 'oper':21 'post1':25 'provid':10 'pybind11':9 'python':2,27 'releas':36 'requir':26 'slow':31 'turbo':7,40 'turbojpeg':1 'use':8 'version':23","created_at":"2026-05-01T08:14:41.573923+00:00","updated_at":"2026-05-01T08:14:41.573923+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/Dobatymo/turbojpeg-python","docs":null,"changelog":null,"pypi":"https://pypi.org/project/turbojpeg/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}