Questions tagged [image-compression]

The objective of image compression is to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form. Image compression may be lossy or lossless.

816 questions
3
votes
0 answers

What is the best way to compress image?

I am working on spring web application, in which I have functionality where user can upload image. I have confusion about when to compress this image. I am thinking for below 3 choices. 1) User upload image, compress image in backend, save this…
ilesh patel
  • 106
  • 1
  • 1
  • 5
3
votes
3 answers

Algorithms: How to highlight image difference using rectangles?

I need to compare two images and create rectangles of the difference. I can build a difference matrix like this: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1…
Finkelson
  • 2,921
  • 4
  • 31
  • 49
3
votes
1 answer

php- compressing a base64 decoded image fails

I get images as base64 encoded string front end and I have to decode them and save them as images in server. Image can be of any format- png,gif or jpeg. This part works fine. But sometimes the images uploaded by the users can be of very large size,…
version 2
  • 1,049
  • 3
  • 15
  • 36
3
votes
0 answers

How best to archive many JPEG files containing significant redundancy across their scenes?

Archives of JPEG files don't compress well, ostensibly because each JPEG is already highly compressed. However, when there is much redundancy between images (e.g., archived stills from a stationary camera), and the number of files is large (think…
lionel
  • 231
  • 2
  • 7
3
votes
0 answers

Image compression increases file size in PHP

I have just written the PHP code to compress image size. My code compresses images but not all the time. In 10% cases, it increases the image size. Please tell why this is happening? Here is my code: (Two functions here, one for png images and other…
H Square
  • 31
  • 3
3
votes
1 answer

Discrete Cosine Transformation 1D Matlab

I'm trying to implement DCT in MATLAB by using matrix-vector multiplication. Specifically, I'd like to create the DCT matrix of coefficients then use this to multiply with 1D signal to compute the 1D DCT. Here's my code to produce the DCT…
Mark Ben
  • 177
  • 1
  • 1
  • 14
3
votes
2 answers

Algorithm to compress jpeg to achieve a specified target image file size

I have a couple of javascript libraries (angular-ahdin, J-I-C), that I can use to compress an image the user uploaded before I submit it to the back end. All libraries I've seen take a quality parameter and use jpeg compression to reduce the file.…
toddmo
  • 20,682
  • 14
  • 97
  • 107
3
votes
2 answers

JPG compression and noise

I am studying jpeg compression and it seems to work by reducing high frequency components in images. Since noise is usually high frequency, does this imply that jpeg compression somewhat works on reducing noise in images?
Julia
  • 103
  • 1
  • 9
3
votes
1 answer

JPEG Compression using OpenCV

I'm trying to perform a basic JPEG Compression (DCT + quantization + IDCT) using OpenCV not using entropy-encoding/Huffman-coding. The problem is that after I decompress the compressed image, it is not even close in appearance to the original…
Alexandre Lara
  • 2,464
  • 1
  • 28
  • 35
3
votes
1 answer

PHP Imagick setImageCompression

I'm just starting to write some PHP using the Imagick / ImageMagick library, and have seen several examples regarding setImageCompression which appear to implement things differently. For example I've seen it used like…
Phill Healey
  • 3,084
  • 2
  • 33
  • 67
3
votes
1 answer

AttributeError: 'NoneType' object has no attribute 'ravel'

Can someone please tell me what is wrong with this code? I keep on getting a NoneType error. I am trying to create a histogram. import cv2 import numpy as np from matplotlib import pyplot as plt img =…
Pedro
  • 33
  • 1
  • 5
3
votes
1 answer

Unity3D ETC preview will not display ETC1 format

I am currently in development of Unity game on Android. I've run to an issue with performance on some of the old Android phones and decided to compress all images to ETC1 Format. However, every time I select ETC the preview shows DTX5 or DTX1! Why…
Danielok1993
  • 359
  • 1
  • 6
  • 14
3
votes
1 answer

Resizing pictures while still preserving quality in android

I want to reduce the image file size below 100 KB while preserving the image quality like whatsapp and facebook did. I tried almost all the code of android image compression available on stackoverflow but that doesn't work for me. Right now i am…
user3607917
  • 474
  • 4
  • 16
3
votes
1 answer

Compress photo quality in Android

I'm trying to compress a photo (.jpg) which is taken by the Android Camera. For Example: Compress Image with 2048 x 1536, quality 90, 24bit depth to 1024 x 768, quality 70, 24bit depth Is there any library or something that can do this?
user3810824
  • 63
  • 1
  • 4
3
votes
1 answer

Image Compression using imfinfo function in Matlab

I am trying to calculate the compression ratio of a given image. My matlab code is as follows: temp = imfinfo('flowers.jpg'); comperssion_ratio = (temp.Width * temp.Height * temp.BitDepth) / temp.FileSize; The imfinfo displays the following: …
David Norman
  • 301
  • 2
  • 10
  • 18