Documentation

ImageBlob
in package

Table of Contents

Properties

$bitpix  : Bitpix
$dataBits  : int
$height  : int
$isColor  : bool
$naxis3  : int|null
$width  : int
$blob  : string
$header  : FitsHeader

Methods

__construct()  : mixed
dataBytes()  : Generator
pixels()  : Generator
Returns a generator that yields image data pixel by pixel
pixelsMono()  : Generator
toGdImage()  : GdImage
Convert to GD image
toSVG()  : string
Convert to SVG for display
createGdImage()  : GdImage|false
gdPixel()  : bool

Properties

Methods

dataBytes()

public dataBytes() : Generator
Return values
Generator

pixels()

Returns a generator that yields image data pixel by pixel

public pixels([Channel|null $ch = null ]) : Generator
Parameters
$ch : Channel|null = null
Tags
todo

Conversion from 16 to 8-bit? This won't work with mono images...

Return values
Generator

pixelsMono()

public pixelsMono() : Generator
Tags
todo

Assumes 8-bit

Return values
Generator

toGdImage()

Convert to GD image

public toGdImage() : GdImage
Tags
todo

Throw exception if gd fails?

Return values
GdImage

toSVG()

Convert to SVG for display

public toSVG() : string
Tags
todo

This assumes RGB and produces a gigantic file... Note: pixels are treated as SVG rectangles, RGB values are extracted from bit values... (?!)

Return values
string

createGdImage()

private createGdImage() : GdImage|false
Return values
GdImage|false

gdPixel()

private gdPixel(GdImage $gdImg, int $x, int $y, array<string|int, int> $rgb) : bool
Parameters
$gdImg : GdImage
$x : int
$y : int
$rgb : array<string|int, int>
Return values
bool

        
On this page

Search results