Questions tagged [lossy-compression]

36 questions
75
votes
6 answers

Reducing video size with same format and reducing frame size

This question might be very basic Is there a way to reduce the frame size/rate of Lossy compressed (WMV, MPEG) format, to get a smaller video, of lesser size, with same format. Are there any open source or proprietary apis for this?
Vignesh
  • 1,130
  • 2
  • 12
  • 19
30
votes
10 answers

Can a JPEG compressed image be rotated without a loss in quality?

JPEG is a lossy compression scheme, so decompression-manipulation-recompression normally reduces the image quality further for each step. Is it possible to rotate a JPEG image without incurring further loss? From what little I know of the JPEG…
Mat
  • 82,161
  • 34
  • 89
  • 109
12
votes
5 answers

Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px?

The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source] It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum…
Dave Rutledge
  • 5,525
  • 7
  • 27
  • 24
9
votes
4 answers

How to save a JPEG image on Android with a custom quality level

On Android, how do I save an image file as a JPEG at 30% quality? In standard Java, I would use ImageIO to read the image as a BufferedImage, then save it as a JPEG file using an IIOImage instance:…
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
7
votes
6 answers

Is there a faster lossy compression than JPEG?

Is there a compression algorithm that is faster than JPEG yet well supported? I know about jpeg2000 but from what I've heard it's not really that much faster. Edit: for compressing. Edit2: It should run on Linux 32 bit and ideally it should be in C…
Richard Knop
  • 81,041
  • 149
  • 392
  • 552
6
votes
5 answers

How to recognize if an audio sample has been compressed and then decompressed?

Some years ago I made a music audio recording, and I can't find the original WAV files, I have only compressed MP3s. Now I found an audio CD, but I don't know if it was made using the original, uncompressed WAVs, or if it was made from compressed…
Petr
  • 62,528
  • 13
  • 153
  • 317
3
votes
1 answer

JPEG-XL: How many VarDCT implementations are there?

I am looking at the following innocent looking command line: % cjxl flower.png flower.jxl [...] Encoding [Container | VarDCT, d1.000, effort: 7 | 3332-byte XMP], Using the exact same source code but compiled on different architectures, here is…
malat
  • 12,152
  • 13
  • 89
  • 158
3
votes
2 answers

.NET Multipage Tiff with Lossy Compression

I need a way to take several jpgs and convert them into a single multi page Tiff. I have that working using GDI+ however it only works with the compression LZW which is lossless. This means that my 3 50KB Jpgs turn into 3MB multipage Tiff file. …
Adam Berent
  • 1,992
  • 19
  • 21
3
votes
1 answer

Something like a reversed random number generator

I really don't know what the name of this problem is, but it's something like lossy compression, and I have a bad English, but I will try to describe it as much as I can. Suppose I have list of unsorted unique numbers from unknown source, the…
user1748906
  • 526
  • 4
  • 13
2
votes
1 answer

Image Compression without changing the resolution of an image in swift

I am trying to compress an image using following method jpegData(compressionQuality:) In this case image got compressed but the resolution of an image also got changed. But i actually want only image will compress without changing the resolution.…
2
votes
0 answers

Do JPEGs have canonical representations?

I have noticed something very odd. Python's Pillow, Firefox's CanvasRenderingContext2D.drawImage(), and Photoshop CC all interpret a JPEG differently. What I mean by this is some pixels vary very slightly in color value. For example, a pixel at 183,…
obskyr
  • 1,380
  • 1
  • 9
  • 25
2
votes
1 answer

PHP GD Edit Jpeg without re-compressing

Say I have a jpeg file and I want to set some pixels to a certain color. When I save the jpeg, I am losing color and I see aliasing around my new pixels, even if I set quality to 100. I know it's a lossy format, but I don't want to re-compress the…
Maverick
  • 3,039
  • 6
  • 26
  • 35
1
vote
1 answer

Simple compressed audio encoder for experimenting

Mostly for my own experience and curiosity, I am trying to investigate formats of files and data to get a good enough understanding of them to output files that can be recognized by corresponding programs. For example, by finding specifications of…
1
vote
1 answer

Calculate image height using file size and width

I'm not very hopeful that this is actually even possible because JPG is a lossy compression format, but I'll ask anyway. I have some incomplete metadata about an image, and need to figure out the dimensions without loading the file into memory, or…
JamesWilson
  • 3,833
  • 2
  • 30
  • 40
1
vote
1 answer

Grayscale image obtained after image compression

I am performing image compression using K means clustering algorithm. The images obtained after compression are grayscale, how can I obtain colored image with similar quality as original? import os from skimage import io from sklearn.cluster import …
1
2 3