Comments (3)
If we support this group of formats sooner than later the library will be usable with the Ray Tracing In One Weekend series, which would be extremely convenient.
from imagine.
This is several related "formats" that all probably work with the same general parsing system:
- P1: ascii, 1bpp (0=white, 1=black),
.pbm
- P2: ascii, variable bpp (grayscale/monochrome),
.pgm
- P3: ascii, variable bpp (RGB),
.ppm
- P4: as P1 but binary: 8 pixels packed per byte
- P5: as P2 but binary: 8 or 16 bit per channel (BE)
- P6: as P3 but binary: 8 or 16 bit per channel (BE)
- PF: RGB image format using floats
- Pf: similar to PF but grayscale
- PF4: similar, but uses RGBA
- P7: binary, variable bpp and channels according to header data,
.pam
Note that the header data portion is always ascii text that describes the image, only the image data encoding is what's binary or not.
Since this is all largely intended as a basic intermediate format it's pretty simple stuff. The files end up being huge because they don't have any compression (the ascii versions are actually bigger than their "raw" form because most numbers take more bytes to write as ascii than their in-memory value), but then again you could put the file into a compressed archive instead of specifying that compression is inside the data stream, so maybe it's fine.
from imagine.
Closed by 751d125
from imagine.
Related Issues (20)
- format: XPM / XBM HOT 1
- tag things that require features in their rustdoc
- [bmp] Converting bitmasked data into RGBA8 should use SIMD
- format: XWD
- format: PICT
- [bmp] Header reading/writing functions should probably use references rather than owned arrays
- Clean up the pixel formats module.
- [png] The chrm and gama chunks should have a constant with their srgb equivalent value
- [png] Allocating "automatic" parser for PNG files HOT 1
- Decoders should return iterators
- format: JPEG XL
- png: transparency HOT 1
- bmp: restore HOT 3
- netpbm: restore HOT 2
- png: background color HOT 1
- Auto-decoder size limit HOT 2
- pixel format: argb8888 HOT 1
- `Image::vertical_flip` method
- qoi format support
- make bmp parsing be simd
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagine.