![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
github.com/hexaflex/pnm
This package implements an encoder and decoder for PNM
image formats.
It can be used with Go's image library. It covers all formats as defined
by the 'P1' to 'P6' specifications.
Each format differs in what colors it is designed to represent:
Each file starts with a two-byte magic number (in ASCII) that identifies the type of file it is (PBM, PGM, and PPM) and its encoding (ASCII or binary). The magic number is a capital P followed by a single-digit number.
Magic Number | Type | Encoding |
---|---|---|
P1 | bitmap | ASCII |
P2 | graymap | ASCII |
P3 | pixmap | ASCII |
P4 | bitmap | Binary |
P5 | graymap | Binary |
P6 | pixmap | Binary |
The ASCII formats allow for human readability and easy transfer to other platforms (so long as those platforms understand ASCII), while the binary formats are more efficient both in file size and in ease of parsing, due to the absence of whitespace.
In the binary formats, PBM uses 1 bit per pixel, PGM uses 8 bits per pixel, and PPM uses 24 bits per pixel: 8 for red, 8 for green, 8 for blue.
go get github.com/hexaflex/pnm
import "image"
import _ "github.com/hexaflex/pnm"
...
img, format, err := image.Decode("myfile.pnm)
...
Unless otherwise stated, all of the work in this project is subject to a 3-clause BSD license. Its contents can be found in the enclosed LICENSE file.
FAQs
Unknown package
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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.