Questions tagged [lossless]

Lossless data compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.

Lossless data compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.

82 questions
22
votes
5 answers

Lossless JPEG Rotate (90/180/270 degrees) in Java?

Is there a Java library for rotating JPEG files in increments of 90 degrees, without incurring image degradation?
Henry
  • 32,689
  • 19
  • 120
  • 221
20
votes
2 answers

Lossless rotation of PDF files with imagemagick

I want to rotate a 351K PDF named 08-file.pdf using CLI tools. I've tried imagemagick: convert 08-file.pdf -rotate 90 08-file-rotated.pdf But the original quality: Suffered serious degradation: I've tried adding the -density 300x300 argument, but…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
10
votes
3 answers

What's the best way to maintain un-parsed JSON fields in Go?

I'd like to decode a JSON blob into a Go struct, manipulate on it, and encode it back to JSON. However, there are dynamic fields in the JSON that aren't relevant to my struct and I want to maintain them when I serialize back to JSON. For example: {…
Joe Shaw
  • 22,066
  • 16
  • 70
  • 92
8
votes
1 answer

How to get a lossless encoding with ffmpeg - libx265

I would like to convert 16 bits grayscale images in an HEVC/mkv video with the x265 encoder without loss, using ffmpeg. I use the monochrome12 profile. My first step is to convert images into yuv format: ffmpeg -f image2 -i "C:\DATA…
teamblast
  • 81
  • 1
  • 1
  • 4
8
votes
3 answers

Lossless Join and Decomposition From Functional Dependencies

Suppose the relation R( K, L, M, N, P), and the functional dependencies that hold on R are: - L -> P - MP -> K - KM -> P - LM -> N Suppose we decompose it into 3 relations as follows: - R1(K, L, M) - R2(L, M, N) - R3(K, M, P) How can we…
7
votes
3 answers

Is there mathematical proof that Huffman coding is the most efficient lossless compression algorithm?

My friend told me it existed but I could never find it, not sure if he was lying but I'm very interested as to how the proof works. (Yes, I'm one of those people who found out about Huffman coding from the Silicon Valley TV show, sorry)
7
votes
1 answer

How to lossless concatenate ogg vorbis files?

I'm trying to concatenate multiple ogg vorbis files into one. I know that theoretically it should be enough to do: cat 1.ogg 2.ogg > combined.ogg But this has disadvantages: not all players support files created like this (gstreamer doesn't) the…
josch
  • 6,716
  • 3
  • 41
  • 49
6
votes
1 answer

How to make jpeg lossless in java?

Is there someone that can tell me how to write 'jpeg' file using lossless compression in java? I read the bytes using the code below to edit the bytes WritableRaster raster = image.getRaster(); DataBufferByte buffer = (DataBufferByte)…
Ran Gualberto
  • 714
  • 5
  • 15
  • 22
6
votes
3 answers

Is it possible to perform a lossless rotation on a JPEG Image in PHP?

I need to rotate some existing JPG images. They have already lost some detail, but I now want to rotate them and lose no further detail. With a little research, it seems the only lossless Image rotation library for PHP is by using the jPegTran…
Jon Winstanley
  • 23,010
  • 22
  • 73
  • 116
6
votes
2 answers

Lossless JPEG - can't find any example images, DICOM files

I'm currently working on the lossless JPEG files(not JPEG-LS). It's really hard to find any files to test my application on. Particulary I need files that contain reset interval markers, multiple DC huffman tables, multiple scenes or comment…
Witek
  • 259
  • 1
  • 3
  • 9
5
votes
5 answers

How do I seamlessly concatenate MP3 streams?

I'm working on a streaming server that will be capable of broadcasting targetted ads. Basically listeners hear the same music, but every, say, 30 minutes comes a block of ads and every listener has his/her own block. Implementing such streaming…
Jasiu
  • 2,674
  • 2
  • 27
  • 27
5
votes
4 answers

Compact lossless representation of floating point constants in C/C++

I have a program written in C++ which is generating C source code for mathematical calculations. I have noticed that the constants take up very much space in the generated code and am looking for a more compact representation. To generate constants,…
Joel
  • 1,295
  • 15
  • 30
4
votes
0 answers

What's the purpose of component identifiers in JPEG's start of frame (SOF) headers?

I'm currently working on a OpenCL-Decoder for lossless JPEG (DNG, CR2, etc.). The standard imposes very few restrictions on how the components may be laid out (interleave vs. planar), which collides with the rather inflexible…
Kai Giebeler
  • 517
  • 6
  • 12
4
votes
1 answer

Combine differently sized JPEGs with jpegtran

I've successfully used jpegtran to combine JPEGs of the same size (512x512) using the method described in this stackoverflow answer: https://stackoverflow.com/a/29615714/2364680 These are tiled JPEGs from the internet that make a 360 panorama when…
grgoelyk
  • 397
  • 1
  • 3
  • 12
4
votes
1 answer

What is the ideal image format extraction for YUV color space and lossless compression from mxf video format using ffmpeg

I would like to be able to work on frames from an .mxf video file. The image format of the video is JPEG 2000, using a YUV color space with 4:2:2 subsampling and lossless compression. My intentions are to extract frames from this video using…
DragonDance27
  • 97
  • 2
  • 12
1
2 3 4 5 6