thumbor / opencv-engine

Thumbor engine for the openCV imaging library.
MIT License
26 stars 26 forks source link

does opencv engine support jpeg2000 format? #39

Open bagipriyank opened 6 years ago

bagipriyank commented 6 years ago

I see that there is a thumbor plugin for jpeg2000 (https://github.com/thumbor/thumbor-plugins/wiki/JPEG2000). However it seems like it will only work with PIL, and hence pil engine. Would it be possible to support jp2 format with opencv engine as well?

christianjgreen commented 6 years ago

Yes! Straight from the docs.

Note OpenCV offers support for the image formats Windows bitmap (bmp), portable image formats (pbm, pgm, ppm) and Sun raster (sr, ras). With help of plugins (you need to specify to use them if you build yourself the library, nevertheless in the packages we ship present by default) you may also load image formats like JPEG (jpeg, jpg, jpe), JPEG 2000 (jp2 - codenamed in the CMake as Jasper), TIFF files (tiff, tif) and portable network graphics (png). Furthermore, OpenEXR is also a possibility.

bagipriyank commented 6 years ago

I mean would it be possible to support jpeg2000 via format filter like localhost:8000/unsafe/filters:format(jp2)/someimage.png. Currently it returns a jpeg image.