Specs for various image formats?
Specs for various image formats?
When i wiev an unconpressed image, let say 16*16px tiff, i an hex editor, i certainly see the various pixel values as they should be, however there is also alot i can figure out. Futher more i also need alpha, so where can you find these sorts of information and which image format (uncompressed with alpha) would you recomend?
This was supposed to be a cool signature...
You can store uncompressed PNG, too - but your software must support compression to be compliant to the PNG standard. Depending on where you want to go with your application, it could be a viable decision to start with PNG as a format you're likely to implement later on anyhow.
Every good solution is obvious once you've found it.
i am reading the specs as of right now, ive done 40 pages and still only have figured out 20 byte of the header (more or less) My head hurts
Anyway, it seems not to be too complicated, but i probably wont be done with it today.
What i did was creating a small image with gimp, with some easily recognisable ( sorry for my spelling) pixel values, however when i view it in the hex editor it isn't. As i understand it, no filtering has been used, so that shouldn't be the problem and that goes for compression and interlacing too. This information is gathered from the the file itself, not gimp.
I guess i will come upon a explanation sooner or later.
Anyway, it seems not to be too complicated, but i probably wont be done with it today.
yes...Solar wrote:As I said, PNG can be stored uncompressed too.
What i did was creating a small image with gimp, with some easily recognisable ( sorry for my spelling) pixel values, however when i view it in the hex editor it isn't. As i understand it, no filtering has been used, so that shouldn't be the problem and that goes for compression and interlacing too. This information is gathered from the the file itself, not gimp.
I guess i will come upon a explanation sooner or later.
This was supposed to be a cool signature...
I'm actually making progress, what is bothering me is a few things like if i create an image in an apropiate program, draw a pixel with a specific value, fx. 0xFF9933, then save it without compressing it, i would expect to find that exact value somewhere in the file when viewing it in a hex editor, but i don't.
Also the maximun allowed bit depth is 16, which doesn't make sence to me. If it where 8 or 24/32 it would, 8 per color or 24/32 in total. To me 16 only makes sence if we ara talking greyscale with alpha, but in that case a bitdepth of 8 is actually alowed. This leads me to conclude that we can work with pictures with a bitdepth 48 as oposed to 24 which i believe is normal.
there is a number of thing i don't understand, probably because iv'e missed something. Im sure i will get it eventually, but still, it makes my head hurt.
Also the maximun allowed bit depth is 16, which doesn't make sence to me. If it where 8 or 24/32 it would, 8 per color or 24/32 in total. To me 16 only makes sence if we ara talking greyscale with alpha, but in that case a bitdepth of 8 is actually alowed. This leads me to conclude that we can work with pictures with a bitdepth 48 as oposed to 24 which i believe is normal.
there is a number of thing i don't understand, probably because iv'e missed something. Im sure i will get it eventually, but still, it makes my head hurt.
This was supposed to be a cool signature...
I am not a master of the PNG format, but I know it offers:
- 256-color palette-based,
- greyscale with 1, 2, 4, 8 or 16 bit;
- RGB with 8 or 16 bit per channel (Red, Green, Blue, Alpha, for a total of 24 or 48 bit / pixel).
Every good solution is obvious once you've found it.
Ok, i need to read up on that because i have no idea what you are talking about. Sure i know about the graphic card, but i have never heard that a image format could infact handle more than 24 bits (32 with alpha), not any regular formats anyway.Solar wrote:48 bit per pixel isn't that extraordinary. I think you are confusing the 24 / 48 bit per pixel of PNG with the 8 / 16 / 24bit of graphics cards... which are two very different things.
I would never need more that 24 bits if its just for use on my computer i supose?
I have actually found my pixel value by now, but that means that i still have 12 bytes left that i haven't got a clue what means.
here is the raw image data:
78 01 01 04 00 fb ff 00 11 22 33 00 ae 00 67
The bold values are of couse my pixel value and the 0x00 following could be an alpha value, that is it cannot as the IHDR header specifies otherwise.
Still i have come a long way since: "haven't got a clue."
This was supposed to be a cool signature...
TGA, PNG and a couple of others.Zacariaz wrote:Sure i know about the graphic card, but i have never heard that a image format could infact handle more than 24 bits (32 with alpha), not any regular formats anyway.
If you think Counterstrike, no. If you think Photoshop, definitely. Astronomical or medical images, for example, undergo heavy postprocessing, and you need every bit of information you can get.I would never need more that 24 bits if its just for use on my computer i supose?
Every good solution is obvious once you've found it.
If you think Counterstrike, no. If you think Photoshop, definitely. Astronomical or medical images, for example, undergo heavy postprocessing, and you need every bit of information you can get.[/quote]I would never need more that 24 bits if its just for use on my computer i supose?
the answer then is no while i do from time to time look at pictures taken by the hubble space telescope i don't download those "above 100 megs" pictures, i don't want to wait 8 hour just to open it...
Anyway, im at a standstill in my PNG investigation so anyone who might have some experience, specificly regarding the IDAT chunk, i would really appreciate some help.
Regards
This was supposed to be a cool signature...
Re: Specs for various image formats?
Why do you not just make your own simple raw format with alpha channal ?, i have written a program for my OS, that take most image formats (jpeg, gif, bmp) and changes them to a format that as the first 2 dwords XY sizes and the rest raw hex of the 24bit color.Zacariaz wrote:When i wiev an unconpressed image, let say 16*16px tiff, i an hex editor, i certainly see the various pixel values as they should be, however there is also alot i can figure out. Futher more i also need alpha, so where can you find these sorts of information and which image format (uncompressed with alpha) would you recomend?
You could easy use 32bit and use it for alpha info.
To start with if you code it for a OS like windows or linux, you can easy use libs to convert it from any file format to your format, and use the raw data thats in memory to convert to your image format.
- Attachments
-
- Music.asm
- Here is the output from a 32x32 bmp image.
- (16.85 KiB) Downloaded 71 times