libvips / pyvips

python binding for libvips using cffi
MIT License
650 stars 50 forks source link

Image.asinh() not supported but is expected to be #301

Open acscott opened 2 years ago

acscott commented 2 years ago

vimage.py has an asinh function but it's not in VipsOperationMath

Traceback (most recent call last):
  File "/home/adam/thumbs/exstamps.py", line 42, in <module>
    img = img.asinh()
  File "/usr/local/lib/python3.9/dist-packages/pyvips/vimage.py", line 1352, in asinh
    return self.math('asinh')
  File "/usr/local/lib/python3.9/dist-packages/pyvips/vimage.py", line 938, in call_function
    return pyvips.Operation.call(name, self, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/pyvips/voperation.py", line 282, in call
    op.set(name, intro.details[name]['flags'], match_image, value)
  File "/usr/local/lib/python3.9/dist-packages/pyvips/voperation.py", line 216, in set
    super(Operation, self).set(name, value)
  File "/usr/local/lib/python3.9/dist-packages/pyvips/vobject.py", line 112, in set
    gv.set(value)
  File "/usr/local/lib/python3.9/dist-packages/pyvips/gvalue.py", line 174, in set
    GValue.to_enum(gtype, value))
  File "/usr/local/lib/python3.9/dist-packages/pyvips/gvalue.py", line 110, in to_enum
    raise Error('no value {0} in gtype {1} ({2})'.
pyvips.error.Error: no value asinh in gtype VipsOperationMath (42283696)
  pyvips: enum 'VipsOperationMath' has no member 'asinh', should be one of: sin, cos, tan, asin, acos, atan, log, log10, exp, exp10
jcupitt commented 2 years ago

Hi @acscott,

I would guess your libvips is too old. You need libvips 8.12 or later for the hyperbolic trig functions.

acscott commented 2 years ago

Thank you John! Indeed, I'm on 8.10.5-2ubuntu1. Thanks for such a quick response!

On Fri, Jan 28, 2022 at 9:10 AM John Cupitt @.***> wrote:

Hi @acscott https://github.com/acscott,

I would guess your libvips is too old. You need libvips 8.12 or later for the hyperbolic trig functions.

— Reply to this email directly, view it on GitHub https://github.com/libvips/pyvips/issues/301#issuecomment-1024429425, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJUEFWEQI2JEFVNYATRBYLUYLEWZANCNFSM5NBHNK2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>