Skip to content

Commit 24ac227

Browse files
committed
0.1.4
1 parent 8d97891 commit 24ac227

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PyImageCUDA 0.1.3
1+
# PyImageCUDA 0.1.4
22

33
[![PyPI version](https://img.shields.io/pypi/v/pyimagecuda.svg)](https://pypi.org/project/pyimagecuda/)
44
[![Build Status](https://github.com/offerrall/pyimagecuda/actions/workflows/build.yml/badge.svg)](https://github.com/offerrall/pyimagecuda/actions)

pyimagecuda/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import ctypes
22
import sys
33

4-
__version__ = "0.1.3"
4+
__version__ = "0.1.4"
55

66
def _check_nvidia_driver():
77
try:

pyimagecuda/io.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,20 @@ def load(
7575
filepath: Path to the image file
7676
f32_buffer: Optional float32 buffer to reuse
7777
u8_buffer: Optional uint8 buffer to reuse
78-
autorotate: If True, applies EXIF orientation automatically
78+
autorotate: If True, applies EXIF orientation automatically (only for formats that support it)
7979
8080
Docs & Examples: https://offerrall.github.io/pyimagecuda/io/#loading-images
8181
"""
82-
vips_img = pyvips.Image.new_from_file(filepath, access='sequential', autorotate=autorotate)
82+
try:
83+
if autorotate:
84+
vips_img = pyvips.Image.new_from_file(filepath, access='sequential', autorotate=True)
85+
else:
86+
vips_img = pyvips.Image.new_from_file(filepath, access='sequential')
87+
except pyvips.error.Error as e:
88+
if 'does not support optional argument autorotate' in str(e):
89+
vips_img = pyvips.Image.new_from_file(filepath, access='sequential')
90+
else:
91+
raise
8392

8493
if vips_img.bands == 1:
8594
vips_img = vips_img.bandjoin([vips_img, vips_img, vips_img])

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
44

55
[project]
66
name = "pyimagecuda"
7-
version = "0.1.3"
7+
version = "0.1.4"
88
description = "GPU-accelerated image processing library for Python"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)