Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
frign
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
frign
11y ago
What do you need custom headers for? I think this problem is better solved with tagging file systems. BIP/BSQ Image Encoding can be done just well (you have (2^16)^3 colors), but you need to leave the interpretation to the outside. It
32.
▲
by
frign
11y ago
You can also use AdobeRGB with Farbfeld, but from my experience, those photographers shooting and printing in AdobeRGB with late CMYK export have Photoshop/PhotoRAW as their pipeline. If you fuck one thing up trying to handle AdobeRGB
33.
▲
by
frign
11y ago
Nowadays, most computers use Little Endian, however, that might change in the future. Also, there's no justification to write software only for one endianness due to speed(tm) or something. Learn to use the interfaces provided by the s
34.
▲
by
frign
11y ago
Yeah right... http://www.codeproject.com/KB/graphics/TargaImage/TargaImage...
35.
▲
by
frign
11y ago
Ah yeah, excuse me please. I've used errno too often today :P It's corrected now.
36.
▲
by
frign
11y ago
The bzip2 choice is not set in stone. The reason why PNG is built on top of deflate is because back then there was nothing better around for the computing power available. If you talk about speeds, the more or less only revelant measure is
37.
▲
by
frign
11y ago
I also noticed that in my tests, thus I stressed this point in the FAQ. If you try LZMA, you'll see that it sometimes is actually worse than bzip2, even though the latter is regarded to be quite aged compared to the former.
38.
▲
by
frign
11y ago
Keep in mind not all machines are Little Endian. This assumption is wrong.
39.
▲
by
frign
11y ago
If you just want to read in the header data, it should be sufficient if you just piped the decompressed data to your "header-checker" like this bzip2 < giantimage.ff.bz2 | header-checker Inside the header checker, you just read
40.
▲
by
frign
11y ago
It is specified (BE = Big Endian)
41.
▲
by
frign
11y ago
Hey krasin, how come people assume there are only Little Endian machines. This mmap-technique wouldn't work on Big Endian like this, this is inaccetable! However, you can still mmap and properly call ntohs() on each color channel value
42.
▲
by
frign
11y ago
thing is, bzip2 is widespread, unlike lzma not everybody has. on a technical side, lzma is a better choice. I might add a lzma recommendation, however, in soma cases lzma performs worse than bzip2. also, decompression speeds matter, not com
43.
▲
by
frign
11y ago
Actually, you can have images with up to (2^32-1) (2^32-1) pixels. Given each pixel stores 64 Bits of data, there are 2^64 combinations for each pixel, yielding in the total number of possible images as: (2^64)^((2^32-1) (2^32-1)) ~ 10^(10^
44.
▲
Farbfeld – A suckless image format
(tools.suckless.org)
112 points
by
frign
11y ago
|
88 comments