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.

732 questions
79
votes
11 answers

Is it possible to tell the quality level of a JPEG?

This is really a two part question, since I don't fully understand how these things work just yet: My situation: I'm writing a web app which lets the user upload an image. My app then resizes to something displayable (eg: 640x480-ish) and saves the…
nickf
  • 499,078
  • 194
  • 614
  • 709
62
votes
3 answers

Image Compression tools via command line

I'm searching best tool to compress images (png and jpeg) via command line. After googling I found trimage which is good as it compresses both png and jepeg, but compression ratio is very poor in this case. I came across jpeg-optimizer.com…
Mukesh Yadav
  • 1,996
  • 1
  • 26
  • 47
52
votes
5 answers

Setting jpg compression level with ImageIO in Java

I'm using javax.imageio.ImageIO to save a BufferedImage as a jpeg file. In particular, I created the following Java function: public static void getScreenShot(BufferedImage capture, Path folder, String filename) { try { …
mat_boy
  • 10,930
  • 19
  • 62
  • 103
35
votes
13 answers

How to compress image size?

I want to capture image in low resolution using android camera api but when I captured image it will take default resolution of device camera.So I want to capture image in low resolution or small size at time of capture or how can I compress big…
30
votes
17 answers

Code Golf: 1x1 black pixel

Recently, I used my favorite image editor to make a 1x1 black pixel (which can come in handy when you want to draw solid boxes in HTML cheaply). Even though I made it a monochrome PNG, it came out to be 120 bytes! I mean, that's kind of steep. …
Joey Adams
  • 37,814
  • 17
  • 79
  • 110
29
votes
2 answers

Reduce the size of a bitmap to a specified size in Android

I want to reduce the size of a bitmap to 200kb exactly. I get an image from the sdcard, compress it and save it to the sdcard again with a different name into a different directory. Compression works fine (3 mb like image is compressed to around 100…
TharakaNirmana
  • 9,667
  • 8
  • 45
  • 67
23
votes
9 answers

How to save an image with a specific filesize?

I am building a PHP system whereby users can create a visually complex image that has the final requirement of being 50kB or less. The user can select to have text printed onto one of 37 template images, so the result is a single flat image. The…
Jess Telford
  • 11,402
  • 8
  • 39
  • 50
22
votes
3 answers

How to compress Bitmap as JPEG with least quality loss on Android?

This is not a straightforward problem, please read through! I want to manipulate a JPEG file and save it again as JPEG. The problem is that even without manipulation there's significant (visible) quality loss. Question: what option or API am I…
TWiStErRob
  • 38,918
  • 20
  • 146
  • 220
19
votes
5 answers

Compare source image against a bank of known images

I am building an App for a parent of a friend of mine that sadly had a stroke and can no longer talk, read or spell. He can however draw rather detailed drawings. I have currently built an App that can process an image of a drawing and detect basic…
Ste Prescott
  • 1,699
  • 1
  • 20
  • 42
18
votes
3 answers

How can I compress images using java?

From pagespeed I am getting only image link and possible optimizations in bytes & percentage like, Compressing and resizing https://example.com/…ts/xyz.jpg?036861 could save 212KiB (51% reduction). Compressing…
18
votes
1 answer

An Image Compression tool for windows similar to ImageOptim (of mac)

I was looking for a image compression tool for windows(Windows 7, more specifically), similar to ImageOptim (of mac). I've used few jpeg compressors tools in windows but they aren't giving the desired result. Yes, they compress the size but the…
JayKandari
  • 1,158
  • 3
  • 14
  • 32
16
votes
4 answers

Using SVD to compress an image in MATLAB

I am brand new to MATLAB but am trying to do some image compression code for grayscale images. Questions How can I use SVD to trim off low-valued eigenvalues to reconstruct a compressed image? Work/Attempts so far My code so far…
Justin
  • 263
  • 1
  • 2
  • 7
15
votes
2 answers

How to compress the image using gifsicle tool or any other tool on ubuntu

I have some images in .GIF format which i want to compress. But i am getting the output either same or hardly 2-5% compression.I need higher compression ratio so that the web pages can be loaded fastly. Currently i am using the gifsicle tool but…
anand
  • 1,570
  • 2
  • 22
  • 53
15
votes
3 answers

why DCT transform is preferred over other transforms in video/image compression

I went through how DCT (discrete cosine transform) is used in image and video compression standards. But why DCT only is preferred over other transforms like dft or dst?
mrsatish
  • 399
  • 2
  • 6
  • 15
14
votes
4 answers

Optimize uploaded images with php (jpeg)

When running Page Speed in Google Chrome it suggests to optimize/compress the images. These images are mostly uploaded by users, so I would need to optimize them during uploading. What I find about optimizing jpeg images with php is something like…
Juvlius
  • 207
  • 1
  • 2
  • 6
1
2 3
48 49