dmitri.shuralyov.com/scratch/...

Add image/{png,jpeg} packages.

These are tiny packages for testing purposes only.
dmitshur committed 6 years ago commit cdbe493822d69ed5993f809811fc8aa7eb99f42b
Collapse all
image/jpeg/jpeg.go
@@ -0,0 +1,8 @@
// Package jpeg implements a tiny subset of a JPEG image decoder and encoder.
//
// JPEG is defined in ITU-T T.81: http://www.w3.org/Graphics/JPEG/itu-t81.pdf.
package jpeg

// Magic is the magic prefix that identifies the JPEG format.
// It can be used with image.RegisterFormat.
const Magic = "\xff\xd8"
image/png/png.go
@@ -0,0 +1,8 @@
// Package png implements a tiny subset of a PNG image decoder and encoder.
//
// The PNG specification is at http://www.w3.org/TR/PNG/.
package png

// Magic is the magic prefix that identifies the PNG format.
// It can be used with image.RegisterFormat.
const Magic = "\x89PNG\r\n\x1a\n"