![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This code implements a streaming parser/serializer for ascii PPM formatted images in JavaScript. The PPM file format is very simple and human readable, so it can be useful when debugging graphics applications. The downside though is that PPM is not a very efficient format, and so it is not really suitable for long term archival or transmission of images. For those applications, you should use a standard network image format like PNG or JPEG, depending on your requirements.
To install, first you do:
npm install ppm
And here is how you can use it to write/read back an image:
var ppm = require("ppm");
var image = [
[[255, 0, 0], [255, 0, 0], [255, 0, 0]],
[[0, 255, 0], [0, 255, 0], [0, 255, 0]],
[[0, 0, 255], [0, 0, 255], [0, 0, 255]]
];
ppm.parse(ppm.serialize(image), function(err, img) {
console.log(err, img);
});
The API is streaming, and should be compatible with all the stand node.js features from fs/net/etc..
ppm.parse(stream, cb(err, result))
Parses an ASCII ppm file from the stream. When finished, calls result with the error/result of parsing the file.
ppm.serialize(image)
Converts an image into an ASCII ppm stream
(c) 2013 Mikola Lysenko. BSD
FAQs
A simple streaming ascii PPM image parser/writer
We found that ppm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.