what is the pvrtc texture compression binary format? - compression

I'm not looking for a definition. I'm looking for what the format is so I make them or decode them myself, no libraries, no tools, just the format so I can write my own code. If you know what the format is please post it here or post a link.

According to a colleague of mine, the PowerVR SDK from Imagination Technologies should contain reference decompression code and also a document ("PVRTC & Texture Compression
User Guide") with the binary format.

Related

TIFF file - how to decode compression type 3 and 4

I'm writing a tiff decoder and I can't find any technical resources with resources for decoding CCITT Fax Group 3 or 4.
Does anybody have any resources which explain these? The regular TIFF 6.0 document doesn't tell much about decoding. I guess each segment (tile or strip) are encoded independently but that's pretty much the only information I know. I have implemented compression type 2 and is that huffman code tree the same that is used for compression type 3 or 4?
If nobody can find any resources, please post any hints or code or maybe point to an open source library which contains an implementation (most preferably in Java, but any language works). I have looked at the GDAL source code but that file was huge and I would like to see that as an last resort.
Thanks!
I can only point you to the official documents (specifications).
These documentations aren't available online because the organization that produces them do not allow them to be posted on the internet. You will have to buy these documents from the standards organization.
As for finding relevant code samples, your best bets are:
Libtiff (C library)
Libtiff.NET (.NET library)
Java Imaging
A high level overview, without going into the details, can be found on the Wikipedia article
http://en.wikipedia.org/wiki/Fax#Compression
Terms such as "Modified Read (MR)", "Modified Modified Read (MMR)", are examples of decompression algorithms that are implemented in a TIFF encoding/decoding library.
List of official documentations
"T.4 group 3 Fax"
"T-REC-T.4-200307-I!!PDF-E.pdf"
"T-REC-T.6-198811-I!!PDF-E.pdf"
"T-REC-T.563-199610-I!!PDF-E.pdf"
199707, 199710, 199806, 199904

Saving image without compressing

I know that JPG, BMP, GIF and others formats compress image. But can I get snapshot of display and save it without compressing(in binary file) in programming way (using c/c++ for example or other stuff)?
BMP files aren't compressed by default. See here: https://en.wikipedia.org/wiki/BMP_file_format
http://www.zlib.net is your best solution for loss-less compression in C. It's well-maintained, used in a host of different software and compatible with external archivers such as winzip.
C++ offers wrappers around it such as boost::iostreams::zlib and boost::iostreams::gzip.
Zlib uses the deflate algorithm (RFC1951); here a very good explanation of the algorithm: http://www.zlib.net/feldspar.html
The PAM format is uncompressed and really simple to understand.

c++ video compression library that supports many different compression algorithms?

For a scientific project i need to compress video data. The video however doesn't contain natural video and the quality characteristics of the compression will be different than for natural footage (preservation of hard edges for example is more important than smooth gradients or color correctness).
I'm looking for a library that can be easily integrated in an existing c++ project and that let's me experiment with different video compression algorithms.
Any suggestions?
Look at FFmpeg. It is the the most mature open source tool for video compression and decompression. It comes with a command line tool, and with libraries for codecs and muxers/demuxers that can be statically or dynamically linked.
As satuon already answered, FFmpeg is the go-to solution for all things multimedia. However, I just wanted to suggest an easier path for you than trying to hook your program up to its libraries. It would probably be far easier for you to generate a sequence of raw RGB images within your program, dump each out to disc (perhaps using a ridiculously simple format like PPM), and then use FFmpeg from the command like to compress them into a proper movie.
This workflow might cut down on your prototyping and development time.
As for the specific video codec you will want to use, you have a plethora of options available to you. One of the most important considerations will be: Who needs to be able to play your video and what software will they have available?

Is there an open-source implementation of the Dictionary Huffman compression algorithm?

I'm working on a library to work with Mobipocket-format ebook files, and I have LZ77-style PalmDoc decompression and compression working. However, PalmDoc compression is only one of the two currently-used types of text compression being used on ebooks in the wild, the other being Dictionary Huffman aka huffcdic.
I've found a couple of implementations of the huffcdic decoding algorithm, but I'd like to be able to compress to the same format, and so far I haven't been able to find any examples of how to do that yet. Has someone else already figured this out and published the code?
i have been trying to use http://bazaar.launchpad.net/~kovid/calibre/trunk/view/head:/src/calibre/ebooks/compression/palmdoc.c but compression doesnt produce identical results, & there are 3 - 4 descrepencies also read one related thread LZ77 compression of palmdoc

Decode JPEG to obtain uncompressed data

I want to decode JPEG files and obtain uncompressed decoded output in BMP/RGB format.I am using GNU/Linux, and C/C++.
I had a look at libjpeg, but there seemed not to be any good documentation available.
So my questions are:
Where is documentation on libjpeg?
Can you suggest other C-based jpeg-decompression libraries?
The documentation for libjpeg comes with the source-code. Since you haven't found it yet:
Download the source-code archive and open the file libjpeg.doc. It's a plain ASCII file, not a word document, so better open it in notepad or another ASCII editor.
There are some other .doc files as well. Most of them aren't that interesting though.
Unfortunately I cannot recommend any other library besides libjpeg. I tried a couple of alternatives, but Libjpeg always won. Is pretty easy to work with once you have the basics done. Also it's the most complete and most stable jpeg library out there.
MagickWand is the C API for ImageMagick:
http://imagemagick.org/script/magick-wand.php
I have not used it, but the documentation looks quite extensive.
You should check out Qt's QImage. It has a pretty easy interface that makes this task really easy. Setup is pretty simple for every platform.
If Qt is overkill, you can try Magick++ http://www.imagemagick.org/Magick++/. It supports similar operations and is also well suited for that sort of task. The last time I used it, I struggled a bit with dependencies for it on Windows, but don't recall much trouble on Linux.
For Magick++'s Image class, the function you probably want is getConstPixels.
I have code that you can copy ( or just use as a reference ) for loading a jpeg image using the libjpeg library.
You can browse the code here: http://code.google.com/p/kgui/source/browse/trunk/kguiimage.cpp
Just look for the function LoadJPGImage.
The code is setup to handle c++ binding of my DataHandle class to it for loading the image, that way the image can be a file or data already in memory or whatever.
A slightly out of the box solution is to acquire a copy of the netpbm tools, which transform images from pretty much any format to any other format via one of several very simple intermediate formats. They work well from the shell, and are most often used in pipes to read some arbitrary image, perform an operation on it, and write it out to some other format.
The pbm formats can be as simple as a plain ASCII header followed by the RGB data in ASCII or binary. They are intended to be simple enough to use without required a library to implement.
JPEG is supported in netpbm by read and write filters that are implemented on top of libjpeg.