libjpeg Conflict

Linux specific forum
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

libjpeg Conflict

Post by JHPJHP »

Hi,

Ubuntu 18.04 64 bit
PureBasic 5.62 (x64)
OpenCV 2.4.13.6
CMake (GUI) 3.11.2

Has anyone experienced the following problem, and/or found a solution?
- LINUX: PureBasic Interface to OpenCV

I use CMake to build Shared OpenCV libraries WITH libjpeg, but if my PureBasic scripts include UseJPEGImageDecoder() or UseJPEGImageEncoder(), the OpenCV Function used to return an image Structure fails when opening a JPEG image.

This problem does not affect opening PNG images when libpng is used with UsePNGImageDecoder() or UsePNGImageEncoder().

NB*: The same problem was also prevalent in other builds using earlier versions of Ubuntu, PureBasic and OpenCV.
Last edited by JHPJHP on Mon May 28, 2018 7:06 pm, edited 2 times in total.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: libjpeg Conflict

Post by wilbert »

Would it make a difference to use libjpeg-turbo instead of libjpeg ?
Windows (x64)
Raspberry Pi OS (Arm64)
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: libjpeg Conflict

Post by JHPJHP »

Hi wilbert,

Wow that was quick, I was still formulating my question in the previous post :mrgreen:
wilbert wrote:Would it make a difference to use libjpeg-turbo instead of libjpeg ?
I thought of that, and pointed the libjpeg parameters to the turbo folders, but my first couple attempts failed.
- How to compile OpenCV with libjpeg-turbo?
Last edited by JHPJHP on Mon May 28, 2018 7:36 pm, edited 1 time in total.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: libjpeg Conflict

Post by wilbert »

JHPJHP wrote:I thought of that, and pointed the libjpeg parameters to the turbo folders, but my first couple attempts failed.
- How to compile OpenCV with libjpeg-turbo?
I have little experience with compiling libraries but did find a more recent post about opencv with libjpeg-turbo; don't know if it gives you any new ideas on how to make it work.
http://unanancyowen.com/en/opencv-with-libjpeg-turbo/
Windows (x64)
Raspberry Pi OS (Arm64)
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: libjpeg Conflict

Post by JHPJHP »

Hi wilbert,
What a great find, thank you for the link. With only a quick glance at the documentation, it looks promising; I hope to test it soon.

-----------------------------------------------------------

Hi wilbert,

Another failed build (x4)... I confirmed libjpeg-turbo replaced libjpeg correctly, but the error persisted when using either UseJPEGImageDecoder() or UseJPEGImageEncoder().
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: libjpeg Conflict

Post by wilbert »

JHPJHP wrote:Hi wilbert,

Another failed build (x4)... I confirmed libjpeg-turbo replaced libjpeg correctly, but the error persisted when using either UseJPEGImageDecoder() or UseJPEGImageEncoder().
Sorry to hear that :(
I was hoping that maybe different internal function names of libjpeg-turbo would resolve the conflict.
Windows (x64)
Raspberry Pi OS (Arm64)
Post Reply