---
title: "Discussion on \"The Complete Guide to Image Compression with OpenCV\" | Hashnode"
description: "Discussion on \"The Complete Guide to Image Compression with OpenCV\". Learn how image compression works, and how you can use it in your applications"
url: "https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The Complete Guide to Image Compression with OpenCV](https://www.jeremymorgan.dev/the-complete-guide-to-image-compression-with-opencv?utm_source=hashnode&utm_medium=feed)

Learn how image compression works, and how you can use it in your applications

Aug 20, 2024 · 8 min read · jeremymorgan.dev  
Read the article

-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#computer-vision](https://hashnode.com/tag/computer-vision)
-   [#opencv](https://hashnode.com/tag/opencv)
-   [#opencv-python](https://hashnode.com/tag/opencv-python)
-   [#image-processing](https://hashnode.com/tag/image-processing)
-   [#python](https://hashnode.com/tag/python)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#python-projects](https://hashnode.com/tag/python-projects)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#tutorials](https://hashnode.com/tag/tutorials)

## Written by

[Jeremy Morgan](https://hashnode.com/@JeremyMorgan)

@JeremyMorgan · Oregon, USA

  
[View profile](https://hashnode.com/@JeremyMorgan)

Developer, Hacker, Blogger

I'm a coder, blogger, and training architect for Kode Kloud. Follow me for content related to development and cloud.

## Responses 3

Markdown supported · ⌘↵ to post

[Hansika Dutta](https://hashnode.com/@hansikka88)

[Sep 29, 2024](https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c/comment/66f99b449436965eac60627f)

I love the grounded reality of Harold Kendrick Mentorship program on instagram, despite the recession I'm so happy withdrawing my $94k profits out of my investment with their platform 𝐰𝐭𝐬𝐩 𝗵im ✙𝟦𝟦𝟩𝟦𝟢𝟩𝟨𝟢𝟢𝟣𝟨𝟨.

[Christopher Duran](https://hashnode.com/@chriisduran)

[Sep 10, 2024](https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c/comment/66e050a905a50774f50b8aed)

Is impressive what we can do with OpenCV, time to go back to some project i did with Android Studio.

[John Williams](https://hashnode.com/@jwill8622)

[Aug 22, 2024](https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c/comment/66c779c6dbf19c4a07fed28a)

Does image file compression affect different size images (or ratios) differently? For example, the difference in clarity between the small images and the large backgrounds on sites. And is AVIF any good?

[William Marget](https://hashnode.com/@marget)

[Aug 25, 2024](https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c/comment/66c779c6dbf19c4a07fed28a#reply-66cb035364471d045b0aced8)

Yes John Personally I face this issue when I compress image the pixels not clear.

[Jeremy Morgan](https://hashnode.com/@JeremyMorgan)

[Aug 27, 2024](https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c/comment/66c779c6dbf19c4a07fed28a#reply-66cd38f474d26213e39b5ede)

yes, image file compression works different based on the image size (resolution). It works on a (somewhat) logarithmic scale. Meaning if you take a really low res image (320x240) and reduce the size by 20%, it will look like garbage. Maybe even unusable. If you reduce a 3840x2160 image by 20%, it may not even be noticeable.

In general the more pixels you have to work with, the more optimization you can do before the human eye notices it. In most cases.

[roshan khan](https://hashnode.com/@Roshankhan28)

[Aug 21, 2024](https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c/comment/66c5acab2a994fee352ca656)

i can see various use cases for webapps, such as a chrome extension that can convert the image to webp and reduce the image size

[Jeremy Morgan](https://hashnode.com/@JeremyMorgan)

[Aug 27, 2024](https://hashnode.com/posts/the-complete-guide-to-image-compression-with-opencv/66c41de66f68487a0e21a57c/comment/66c5acab2a994fee352ca656#reply-66cd382216e14c51410e20af)

I'm sure you could build some sort of lambda or other serverless function with OpenCV that could do this fairly easily.
