python - probem with IMWRITE_JPEG_QUALITY in imwrite() (Bug #2193)


Added by Pavel Campr over 12 years ago. Updated about 12 years ago.


Status:Done Start date:2012-07-25
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:python bindings
Target version:2.4.4
Affected version:2.4.3 Operating System:
Difficulty: HW Platform:
Pull request:

Description

as discussed here: http://stackoverflow.com/questions/10410521/opencv-python-save-jpg-specifying-quality-gives-systemerror

1cv2.imwrite('img_CV2_90.jpg', a, [cv2.IMWRITE_JPEG_QUALITY, 90])

fails with exception:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
SystemError: error return without exception set

This works (when cv2.IMWRITE_JPEG_QUALITY is converter from long to int ):

1cv2.imwrite('img_CV2_90.jpg', a, [int(cv2.IMWRITE_JPEG_QUALITY), 90])

Associated revisions

Revision 4044fbcb
Added by Vadim Pisarevsky about 12 years ago

hopefully fixed handling of 'long' Python type in OpenCV bindings (bug #2193). added the corresponding test

Revision 078d4960
Added by Roman Donchenko about 11 years ago

Merge pull request #2193 from apavlenko:2.4_lic_remove

History

Updated by Daniil Osokin over 12 years ago

Which version of OpenCV do you use?

Updated by Daniil Osokin over 12 years ago

  • Assignee changed from Vadim Pisarevsky to Pavel Campr

Updated by Daniil Osokin over 12 years ago

  • Assignee deleted (Pavel Campr)

Updated by Pavel Campr over 12 years ago

I use OpenCV 2.4.2 (compiled from 2.4.2 svn tag, ubuntu 12, 64bit)

Updated by Pavel Campr over 12 years ago

same happens on Windows 7, 64 bit, OpenCV development version from June 2012 (2.4.x).
python is 2.7

Updated by Andrey Kamaev over 12 years ago

  • Description changed from as discussed here: http://stackoverflow.com/questions/10410521/opencv-python-... to as discussed here: http://stackoverflow.com/questions/10410521/opencv-python-... More
  • Assignee set to Vadim Pisarevsky

Updated by Vadim Pisarevsky about 12 years ago

  • Affected version set to 2.4.3
  • Target version deleted ()

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee deleted (Vadim Pisarevsky)

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee set to Vadim Pisarevsky

Updated by Vadim Pisarevsky about 12 years ago

fixed in 2.4 branch

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF