Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

RLE in HDR or PIC image files

I have been trying to make some software to generate high dynamic range image files(*.hdr) in the format specified by Radiance. The specs I looked at suggest the RLE for HDR is basically the same as for PIC.

It is described briefly here:
http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/

I have an uncompressed format that seems fine but I'm not sure how to do the Run length encoding. Uncompressed pixel data is done by using a 4-tuple to represent each pixel. red, green, blue, and an exponent byte.

What I've tried and failed at was a run length encoding where a byte precedes each pixel to indicate how many times the pixel colour repeats itself. This sometimes loads into PaintShop Pro and PhotoMatix but when it does, it doesn't look right at all. It shows a 90% black image with a few very bright dots in a grid pattern.

Do you know how the RLE works in HDR?



Comments

Sign In or Register to comment.