MRC Format: A trip down memory lane.

A place to talk about anything else with other Pixelmator users.
User avatar

2018-06-07 19:26:58

TLDR: Floating point bitmaps = Whoa.

Disclaimer: This has nothing to do with Pixelmator. I just hope that there are enough image format geeks around here to appreciate this. I was reminded of this when reading a discussion of RAW files and 'developing' them into conventional bitmaps.

When I was at university I spent a summer writing a really niche add-on to a somewhat niche piece of homebrew image processing software. The software used bitmaps in the MRC file format. Don't worry if you haven't heard of it. It was specifically developed to process images generated by electron microscopy. As such, it was greyscale only (RGB has no meaning when you're looking at the intensity of an electon beam) and what was really cool* about it was that it held its bitmap data as floating point numbers. Yeah. Forget 8- or 16-bit integers per pixel, this had floating point numbers (4-byte single precision, I think).

Because of this, it was a pleasure to do maths with. You could do pretty much any operation between two bitmaps. You could add two bitmaps together without worrying about the result clipping or subtract one from another without worrying about any posterisation. You would also get ridiculously high dynamic range images. Because the image format didn't naturally restrict you to a particular dynamic range, you specified your black point, white point and mid-grey. This restricted the displayed dynamic range to what was meaningful for what you wanted to get from the image as well as giving it a gamma.

Anyhow, this is just a bit of a ramble. I've thought for ages, "Wouldn't it be neat if this went RGB and entered the mainstream."

I don't think it's likely – the image format has been about for decades and nothing mainstream seems to have happened. Plus, I think that computers (especially graphics cards) are so optimised for integer maths these days that this would probably struggle to compete on performance. I just thought it would be interesting to share a bit about this interesting file format.

- Stef.
* It could also store fourier transforms of images (intensity and phase) as well as 3D density maps (although that, I think, got added after I used it).
There's a very brief wikipedia article here: https://en.wikipedia.org/wiki/MRC_(file_format)
User avatar

2018-06-08 11:53:58

by st3f I just hope that there are enough image format geeks around here to appreciate this.
It's possible that you're the only one, but I still appreciated the post!
User avatar

2018-06-08 16:48:06

It's possible that you're the only one...
I'm strangely comfortable with that. 🤓