Skip to main content

All Questions

Tagged with
-1 votes
1 answer
99 views

how to decompress the DEFLATE compressed data

I wanted to create the internet trend BadApple in c++ console. By extracting every frame from the BadApple video using ffmpeg in .png format and reading RGB pixel data from it. I already have a boiler ...
masteronin99's user avatar
0 votes
1 answer
195 views

How to decompress IDAT compressed data

i wrote some python code to extract each chunk of a PNG image , i've tried with 3 different images and it works perfectly , it also matches perfectly what's displayed in https://rameshvarun.github.io/...
imperial's user avatar
1 vote
1 answer
136 views

Malformed PNG pixel data from deflate "unknown edge cases"

For the past 2 months, I've been implementing a png/deflate decoder, (for various reasons but mainly for learning purposes) but only returns the correct expected data in some cases. Here in this table,...
Makset's user avatar
  • 11
-1 votes
1 answer
350 views

What's wrong with my PNG IDAT CHUNK datas?

i'm trying for learning purpose to create manually a png file from with OpenGL All other CHUNKS are okk (IHDR, pHY, IEND). firstly, I read pixels by Opengl : int s_width = glutGet(GLUT_SCREEN_WIDTH), ...
Igor Mogou's user avatar
0 votes
1 answer
326 views

PNG IDAT chunk data calculation

I'm trying for learning propose to write my own png file in c language. I have already read the PNG file format specification and i am now able to write a basic PNG(signature, IHDR CHUNK, 1px-IDAT ...
Igor Mogou's user avatar
0 votes
1 answer
754 views

How to read and decode zlib block and deflate block in a png image file

Recently I started writing a png decoder for fun.And for understanding the format and compression I have read the following PNG (Portable Network Graphics) Specification, Version 1.2) RFC 1950("...
Nobody's user avatar
  • 5
0 votes
1 answer
289 views

C - zlib - png crc32/deflate

I'm doing an homework to read a png file through zlib in C and I always have checksum not equal to png crc. How I shoul take from zlib? I've been on it for 5 hours and I'm going crazy. Thank you for ...
ProtoTyPus's user avatar
  • 1,312
0 votes
1 answer
49 views

Writing uncompress PNG one/first Deflate block OK second things go wrong

For complex reasons I want to save images using the .PNG standard but without compression. (About the same as here: write png quickly) I find that if I have one Deflate block in my image, tools like ...
stumble's user avatar
0 votes
1 answer
284 views

Why does the PNG specification prohibit having zlib-compressed data with a preset dictionary?

For PNG compression method 0, the zlib compression method/flags code shall specify method code 8 (deflate compression) and an LZ77 window size of not more than 32768 bytes. The zlib compression method ...
Константин Ван's user avatar
1 vote
1 answer
1k views

Best practice to compress bitmap with LZ4

I'm packing some image resources for my game, and since this is a typical "compress once, decompress multiple" scenario, LZ4 High Compression fits me well (LZ4HC take longer time to compress,...
user avatar
2 votes
1 answer
625 views

Understanding IDAT, reading DEFLATE's dynamic Huffman tree

I am looking to better understand zlib, deflate, and PNG encoding. With that said, I am having trouble applying the specifications of RFC-1950 and RFC-1951 to the IDAT portion of a PNG. Below is ...
David Pynes's user avatar
1 vote
1 answer
3k views

How to implement a PNG decoder completely from scratch

I started to work on a PNG encoding/decoding library for learning purposes so I want to implement every part of it by hand. I got pretty long with it but now I'm a bit stuck. Here are the things I ...
Balázs Sáros's user avatar
0 votes
1 answer
2k views

Zlib compression header fails checksum with error -3

I'm trying to write my own deflate implementation in python with Fixed Huffman. When I pack the image back into the .png file nothing is being displayed in a regular image viewer. Each chunk header is ...
Diligent Hero's user avatar
1 vote
2 answers
1k views

Is DEFLATE used in gzip and png compression the same?

I read about gzip compression and png image compression and they both use DEFLATE alghorithm, but I'm not sure that the implementation of that algorithm is the same. Also, if it's the same algorithm, ...
Maja K's user avatar
  • 21
1 vote
1 answer
743 views

How to combine LZ77 and Huffman coding in image compression?

I'm trying to write a code to compress .png image files, but I'm having trouble implementing DEFLATE. I know how to write the LZ77 and Huffman code, but I'm not sure how to combine those two. I know I'...
V22's user avatar
  • 11

15 30 50 per page