Jump to content
  • Advertisement
Sign in to follow this  
Quat

dimensions of raw file

This topic is 4384 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I save a raw file, I just save the bytes with no header info. I am able to load this into Photoshop despite not storing the pixel dimensions (somehow it figures it out). Does anyone know how? Because I want to also import raw files and I need to figure out the size. The only thing I can think of is it just looks at the size and assumes it is square.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Quat
When I save a raw file, I just save the bytes with no header info. I am able to load this into Photoshop despite not storing the pixel dimensions (somehow it figures it out). Does anyone know how? Because I want to also import raw files and I need to figure out the size. The only thing I can think of is it just looks at the size and assumes it is square.


Photoshop probably uses a range of statistical analyses tools to estimate the size of the raw file. In my experience photoshop rarely loaded by 8BIT raws correctly, the major reason for this is obviously because it doesn't have the palette.

So if you are loading single channel or 8Bit per channel images it shouldn't be to hard to determine which order the bytes are in and then arranging the size of the loaded image according to some statistic.

RAWs by nature save NO header information whatsoever, so you only have the size of the file to go by.

Share this post


Link to post
Share on other sites
If you want the simplicity of RAW files, but with very basic header information that many applications can intepret, then I'd advise looking at the PPM file format (and the related PBM and PGM formats). The binary flavour of PPM has an ASCII header you can write out with a single line of source code followed by raw data.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!