A class that provides the ability to work with color images in PF (portable floatmpa image) format.
NB: The format is raw binary. Support of this format is EXPERIMENTAL (!!!).
Note:
This class supports indexing and assigning values to specific pixels via 1D or 2D indexing, and provides PF file loading/saving capabilities.
According to the accepted convention, in the original description of the format inside the Netpbm package, the extension of these files should be *.pfm.
Typical usage:
// create empty PF imageautoimg = newPFImage;
// load from file img.load(`Lenna.pfm`);
// set pixel at (10; 10) as whiteimg[10, 10] = newRGBColor(255, 255, 255);
// get 11th pixelimg[10].writeln;
// save to fileimg.save(`Lenna2.pfm`);
// new PF image, size is 10x10, all pixels blackautoimg2 = newPFImage(10, 10, newRGBColor(0, 0, 0));
// increase two timesimg2[10] = img2[10] * 2;
// select byte order for saving (by default, little-endian, i.e BYTE_ORDER.LITTLE_ENDIAN)img2.setOrder(BYTE_ORDER.BIG_ENDIAN);
// save as pfm fileimg2.save(`test.pfm`);
A class that provides the ability to work with color images in PF (portable floatmpa image) format. NB: The format is raw binary. Support of this format is EXPERIMENTAL (!!!).
Note: This class supports indexing and assigning values to specific pixels via 1D or 2D indexing, and provides PF file loading/saving capabilities. According to the accepted convention, in the original description of the format inside the Netpbm package, the extension of these files should be *.pfm.
Typical usage: