BGRABitmap Miscellaneous types
From Lazarus wiki
Jump to navigationJump to searchMiscellaneous types in BGRABitmap.
Miscellaneous types
TRawImageLineOrder = ( | ||
Order of the lines in an image | ||
riloTopToBottom, | ||
The first line in memory (line 0) is the top line | ||
riloBottomToTop); | ||
The first line in memory (line 0) is the bottom line | ||
TRawImageBitOrder = ( | ||
Order of the bits in a byte containing pixel values | ||
riboBitsInOrder, | ||
The lowest bit is on the left. So with a monochrome picture, bit 0 would be pixel 0 | ||
riboReversedBits); | ||
The lowest bit is on the right. So with a momochrome picture, bit 0 would be pixel 7 (bit 1 would be pixel 6, ...) | ||
TRawImageByteOrder = ( | ||
Order of the bytes in a group of byte containing pixel values | ||
riboLSBFirst, | ||
Least significant byte first (little endian) | ||
riboMSBFirst); | ||
most significant byte first (big endian) | ||
TGraphicsBevelCut = | ||
Definition of a single line 3D bevel | ||
bvNone, | ||
No bevel | ||
bvLowered, | ||
Shape is lowered, light is on the bottom-right corner | ||
bvRaised, | ||
Shape is raised, light is on the top-left corner | ||
bvSpace); | ||
Shape is at the same level, there is no particular lighting | ||
TResampleMode = ( | ||
How the resample is to be computed | ||
rmSimpleStretch, | ||
Low quality resample by repeating pixels, stretching them | ||
rmFineResample); | ||
Use resample filters. This gives high quality resampling however this the proportion changes slightly because the first and last pixel are considered to occupy only half a unit as they are considered as the border of the picture (pixel-centered coordinates) | ||
TResampleFilter = ( | ||
List of resample filter to be used with rmFineResample | ||
rfBox, | ||
Equivalent of simple stretch with high quality and pixel-centered coordinates | ||
rfLinear, | ||
Linear interpolation giving slow transition between pixels | ||
rfHalfCosine, | ||
Mix of rfLinear and rfCosine giving medium speed stransition between pixels | ||
rfCosine, | ||
Cosine-like interpolation giving fast transition between pixels | ||
rfBicubic, | ||
Simple bi-cubic filter (blurry) | ||
rfMitchell, | ||
Mitchell filter, good for downsizing interpolation | ||
rfSpline, | ||
Spline filter, good for upsizing interpolation, however slightly blurry | ||
rfLanczos2, | ||
Lanczos with radius 2, blur is corrected | ||
rfLanczos3, | ||
Lanczos with radius 3, high contrast | ||
rfLanczos4, | ||
Lanczos with radius 4, high contrast | ||
rfBestQuality); | ||
Best quality using rfMitchell or rfSpline | ||
ResampleFilterStr : array[TResampleFilter] of string = | ||
List of strings to represent resample filters | ||
function StrToResampleFilter(str: string): TResampleFilter; | ||
Gives the sample filter represented by a string | ||
TFloodfillMode = ( | ||
Options when doing a floodfill (also called bucket fill) | ||
fmSet, | ||
Pixels that are filled are replaced | ||
fmDrawWithTransparency, | ||
Pixels that are filled are drawn upon with the fill color | ||
fmProgressive); | ||
Pixels that are filled are drawn upon to the extent that the color underneath is similar to the start color. The more different the different is, the less it is drawn upon | ||
TMedianOption = (moNone, moLowSmooth, moMediumSmooth, moHighSmooth); | ||
Specifies how much smoothing is applied to the computation of the median | ||
TRadialBlurType = ( | ||
Specifies the shape of a predefined blur | ||
rbNormal, | ||
Gaussian-like, pixel importance decreases progressively | ||
rbDisk, | ||
Disk blur, pixel importance does not decrease progressively | ||
rbCorona, | ||
Pixel are considered when they are at a certain distance | ||
rbPrecise, | ||
Gaussian-like, but 10 times smaller than rbNormal | ||
rbFast, | ||
Gaussian-like but simplified to be computed faster | ||
rbBox); | ||
Box blur, pixel importance does not decrease progressively and the pixels are included when they are in a square. This is much faster than rbFast however you may get square shapes in the resulting image | ||
TBGRAImageFormat = ( | ||
List of image formats | ||
ifUnknown, | ||
Unknown format | ||
ifJpeg, | ||
JPEG format, opaque, lossy compression | ||
ifPng, | ||
PNG format, transparency, lossless compression | ||
ifGif, | ||
GIF format, single transparent color, lossless in theory but only low number of colors allowed | ||
ifBmp, | ||
BMP format, transparency, no compression. Note that transparency is not supported by all BMP readers so it is not recommended to avoid storing images with transparency in this format | ||
ifIco, | ||
ICO format, contains different sizes of the same image | ||
ifPcx, | ||
PCX format, opaque, rudimentary lossless compression | ||
ifPaintDotNet, | ||
Paint.NET format, layers, lossless compression | ||
ifLazPaint, | ||
LazPaint format, layers, lossless compression | ||
ifOpenRaster, | ||
OpenRaster format, layers, lossless compression | ||
ifPsd, | ||
Photoshop format, layers, rudimentary lossless compression | ||
ifTarga, | ||
Targa format (TGA), transparency, rudimentary lossless compression | ||
ifTiff, | ||
TIFF format, limited support | ||
ifXwd, | ||
X-Window capture, limited support | ||
ifXPixMap, | ||
X-Pixmap, text encoded image, limited support | ||
ifBmpMioMap); | ||
iGO BMP, limited support | ||
DefaultBGRAImageReader: array[TBGRAImageFormat] of TFPCustomImageReaderClass; | ||
List of stream readers for images | ||
DefaultBGRAImageWriter: array[TBGRAImageFormat] of TFPCustomImageWriterClass; | ||
List of stream writers for images | ||
function DetectFileFormat(AFilenameUTF8: string): TBGRAImageFormat; | ||
Detect the file format of a given file | ||
function DetectFileFormat(AStream: TStream; ASuggestedExtensionUTF8: string = ): TBGRAImageFormat; | ||
Detect the file format of a given stream. ASuggestedExtensionUTF8 can be provided to guess the format | ||
function SuggestImageFormat(AFilenameOrExtensionUTF8: string): TBGRAImageFormat; | ||
Returns the file format that is most likely to be stored in the given filename (according to its extension) | ||
function CreateBGRAImageReader(AFormat: TBGRAImageFormat): TFPCustomImageReader; | ||
Create an image reader for the given format | ||
function CreateBGRAImageWriter(AFormat: TBGRAImageFormat; AHasTransparentPixels: boolean): TFPCustomImageWriter; | ||
Create an image writer for the given format. AHasTransparentPixels specifies if alpha channel must be supported | ||
function PositiveMod(value, cycle: Int32or64): Int32or64; inline; overload; | ||
Computes the value modulo cycle, and if the value is negative, the result is still positive | ||
function Sin65536(value: word): Int32or64; inline; | ||
Returns an integer approximation of the sine. Value ranges from 0 to 65535, where 65536 corresponds to the next cycle | ||
function Cos65536(value: word): Int32or64; inline; | ||
Returns an integer approximation of the cosine. Value ranges from 0 to 65535, where 65536 corresponds to the next cycle | ||
function ByteSqrt(value: byte): byte; inline; | ||
Returns the square root of the given byte, considering that 255 is equal to unity | ||