Sign in to follow this  

dimensions of raw file

This topic is 4167 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
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

This topic is 4167 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this