lossless-compression

How to compress gif effectively to reduce size?

爱⌒轻易说出口 提交于 2021-01-29 11:24:32
问题 We use gifs for our blog extensively. We used to embed tenor nano gifs(90px height maintaining aspect ratio, used for GIF previews and shares on mobile) in it. Now we wanted to create our own gifs and are using the following command to convert mp4 to gif while maintaining the properties of tenor's nano gif. using ffmpeg version 4.1.4 But we observed a huge difference in size between the gif we created and the one created using tenor. ffmpeg -i input.mp4 -filter_complex "[0:v]fps=10,scale=-1

Losslessly compressing images on django

我的未来我决定 提交于 2020-02-26 06:07:26
问题 I'm doing optimization and Google recommends Lossless compression to images, looking for a way to implement this in Django. Here's the images they specified, I think for it to be done effectively it needs to implemented systemwide possibly using a middleware class wondering if anyone has done this before. Here's the link to google analytics for pagespeed https://developers.google.com/speed/pagespeed/insights/?url=www.kenyabuzz.com Optimize images Properly formatting and compressing images can

What is the current state of text-only compression algorithms?

社会主义新天地 提交于 2019-12-31 08:11:28
问题 In honor of the Hutter Prize, what are the top algorithms (and a quick description of each) for text compression? Note: The intent of this question is to get a description of compression algorithms, not of compression programs. 回答1: The boundary-pushing compressors combine algorithms for insane results. Common algorithms include: The Burrows-Wheeler Transform and here - shuffle characters (or other bit blocks) with a predictable algorithm to increase repeated blocks which makes the source

Reconstruct original 16-bit Raw pixel data from the HTML5 canvas

非 Y 不嫁゛ 提交于 2019-12-24 08:48:36
问题 If a 16-bit single channel (Gray-scale) raw pixel data losslessly encoded into Image format(e.g.PNG, Webp , Jpeg-2000 or JPEG-XR) and Image rendered to HTML5 canvas, then is there any way to retrieve original 16-bit Raw pixel data from the canvas? 回答1: No. When drawn to a canvas the image is uncompressed, and all the pixels data are pre-multiplied and converted to 24-bit data + an 8-bit alpha channel (RGBA). In this process the image looses everything from the original, even for same color

Where can I find a lossless compression algorithm, which produces headerless outputs?

独自空忆成欢 提交于 2019-12-22 05:16:17
问题 Does anyone of you know a lossless compression algorithm, which produces headerless outputs? For example do not store the huffman tree used to compress it? I do not speak about hard coded huffman trees, but I like to know if there is any algorithm that can compress and decompress input without storing some metadata in its output. Or is this even theoretically impossible? 回答1: Adaptive Huffman coding does exactly that. More generally, the term adaptive coding is used to describe entropy codes

Compress numpy arrays efficiently

我的梦境 提交于 2019-12-22 03:30:16
问题 I tried various methods to do data compression when saving to disk some numpy arrays . These 1D arrays contain sampled data at a certain sampling rate (can be sound recorded with a microphone, or any other measurment with any sensor) : the data is essentially continuous (in a mathematical sense ; of course after sampling it is now discrete data). I tried with HDF5 (h5py) : f.create_dataset("myarray1", myarray, compression="gzip", compression_opts=9) but this is quite slow, and the compression

Best format for lossless image compression in C#

偶尔善良 提交于 2019-12-20 03:14:45
问题 I need to save video frames individually and compress them losslessly. I'm looking for the best method and format in c# - by best I mean the best balance of simplicity of implementation, good compression and reasonable processing requirements. I know PNG is lossless, but its compression isn't great for photo style images. I understand that there is a lossless Jpeg format, but is this implemented in C#? Are there other options I am unaware of? 回答1: Here are some compression ratio's for

Lossless RGB to Y'CbCr transformation

蹲街弑〆低调 提交于 2019-12-18 11:57:21
问题 I am trying to losslessly compress an image, and in order to take advantage of regularities, I want to convert the image from RGB to Y'CbCr. (The exact details of what I mean by RGB and Y'CbCr are not important here; the RGB data consists of three bytes, and I have three bytes to store the result in.) The conversion process itself is pretty straightforward, but there is one problem: although the transformation is mathematically invertible, in practice there will be rounding errors. Of course