gopcd

package module
v0.0.0-...-3e4992a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2021 License: Unlicense Imports: 8 Imported by: 0

README

gopcd

A golang reader for KODAK PCD format. https://en.wikipedia.org/wiki/Photo_CD

This is sort of a rewrite based on pcdtojpg https://pcdtojpeg.sourceforge.io/Home.html (which is in C++) but not with the full features.

note

This wasn't an intended project. It started with a few 30 year old Photo CD ISOs randomly downloaded from archive.org. It'd be quite cumbersome to mount the ISO files, extract the PCDs, and convert them to jpeg using some bash script. As extracting the base image of the PCD format is pretty straightforward, I decided to write some golang code to do the job. Most of the photos were not interesting (they were scanned in 1993) and the default resolution is low and color is a bit off. I haven't looked at the photos since, but didn't want to just abandoned the code, so decoding higher resolution images and a custom YCC to RGB conversion were added just for completeness.

It is probably only useful for archivists.

Documentation

Index

Constants

View Source
const (
	SceneBase16 = iota //	128 × 192		0.025 Mpix	0.07 Mb		Preview (index print, thumbnail)
	SceneBase4         //	256 × 384		0.098 Mpix	0.28 Mb		Web
	SceneBase          //	512 × 768		0.393 Mpix	1.13 Mb		Computer screen, TV, Web
	Scene4Base         //	1024 × 1536		1.573 Mpix	4.50 Mb		HDTV screen
	Scene16Base        //	2048 × 3072		6.291 Mpix	18.00 Mb	Print-out up to ca. 20 x 30 cm
	Scene64Base        // 4096 × 6144		25.166 Mpix	72.00 Mb	Professional print, pre-press, archiving (optional)
)
View Source
const MaxScene = 6

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(r io.ReadSeeker) *Decoder

func (*Decoder) Decode

func (d *Decoder) Decode() (image.Image, int, error)

func (*Decoder) DecodeImage

func (d *Decoder) DecodeImage(scene int) (img image.Image, rotate int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL