# Does the OpenCV included with UE5 come with JPEG compatibility?

**URL:** <https://forums.unrealengine.com/t/does-the-opencv-included-with-ue5-come-with-jpeg-compatibility/1498336>\
**Category:** Programming & Scripting\
**Tags:** opencv, unreal-engine, CPP, question\
**Created:** [December 6, 2023, 5:20pm UTC](https://forums.unrealengine.com/t/does-the-opencv-included-with-ue5-come-with-jpeg-compatibility/1498336 "2023-12-06T17:20:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![behram\_patel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@behram\_patel](https://forums.unrealengine.com/u/behram_patel)\
**Post date:** [October 25, 2024, 7:12am UTC](https://forums.unrealengine.com/t/does-the-opencv-included-with-ue5-come-with-jpeg-compatibility/1498336/2 "2024-10-25T07:12:18Z")

</div>

**Edit 01**  
Your are right it’s not. However #define HAVE\_OPENJPEG is supported and it works for me.

In my local opencv folder (C:\opencv ) jpeg is supported in the cvconfig.h

/\* IJG JPEG codec \*/  
#define HAVE\_JPEG

so yeah, it’s probably not supported in UE’s inbuilt version which is 4.5.  
**End Edit 01**

I hope you found your answer. Your question helped me find a partial answer to my question here.

[debugging exceptions in opencv](https://forums.unrealengine.com/t/debugging-exceptions-opencv-save-image-to-disk/2086942)

After reading your post I changed the type to **png** and everything worked fine !  
I still need to learn how I’d go about debugging this via the call stack .

Cheers,  
b

---

_[View the full topic](https://forums.unrealengine.com/t/does-the-opencv-included-with-ue5-come-with-jpeg-compatibility/1498336)._
