📄 imagemagickapi.pas
字号:
MagickColumns: Cardinal; // Base image width (before transformations)
MagickRows: Cardinal; // Base image height (before transformations)
Exception: TImrExceptionInfo;
ReferenceCount: Integer;
Semaphore: PImrSemaphoreInfo;
Signature: Cardinal;
Previous: PImrImage; // Previous image frame in sequence.
List: PImrImage; // Undo image list (used only by 'display').
Next: PImrImage; // Next image frame in sequence.
end;
// Call back stream handler. Pixels is nil (if allowed) or memory of pixel records
StreamHandler = function(const Image: PImrImage; const Pixels: Pointer; const Columns: Cardinal): LongBool;
TImrBlobInfo = record
Length: Cardinal;
Extent: Cardinal;
Quantum: Cardinal;
Mapped: Boolean;
IsEof: Boolean;
Offset: Int64;
Size: Int64;
Exempt: LongBool;
Status: LongBool; // Cardinal; //LongBool; don't know yet!
Temporary: LongBool;
StreamType: TImStreamType;
sFILE: Pointer; // 'C' FILE* Do not Use, do not touch!
Stream: StreamHandler;
Data: PByte;
SemaphoreInfo: PImrSemaphoreInfo;
ReferenceCount: Integer;
Signature: Cardinal;
end;
PImrImageInfo = ^TImrImageInfo;
TImrImageInfo = record
Compression: TImCompressionType;
Temporary: LongBool;
Adjoin: LongBool; // Join images into a single multi-image file.
Affirm: LongBool;
AntiAlias: LongBool; // Control antialiasing of rendered Postscript
// and Postscript or TrueType fonts. Enabled
// by default.
Size: PChar;
Extract: PChar;
Page: PChar;
Scenes: PChar;
Scene: Cardinal;
NumberScenes: Cardinal;
Depth: Cardinal; // Image depth (8 or 16). QuantumLeap must be
// defined before a depth of 16 is valid.
Interlace: TImInterlaceType;
Endian: TImEndianType;
Units: TImResolutionType;
Quality: Cardinal; // JPEG/MIFF/PNG compression level (default 75).
SamplingFactor: PChar;
ServerName: PChar;
Font: PChar;
Texture: PChar;
Density: PChar;
PointSize: Double;
Fuzz: Double; // Colors within this distance are considered
// equal. A number of algorithms search for a
// target color. By default the color must be
// exact. Use this option to match colors that
// are close to the target color in RGB space.
// NOTE: The current Magick help on this
// struct states this is an INT but image.h
// states it is a double!
BackgroundColor: TImrPixelPacket; // Image background color.
BorderColor: TImrPixelPacket; // Image border color.
MatteColor: TImrPixelPacket; // Image matte (transparent) color.
Dither: LongBool; // Apply Floyd/Steinberg error diffusion to
// the image. The basic strategy of dithering
// is to trade intensity resolution for
// spatial resolution by averaging the
// intensities of several neighboring pixels.
// Images which suffer from severe contouring
// when reducing colors can be improved with
// this option. The colors or monochrome
// option must be set for this option to
// take effect.
Monochrome: LongBool; // Transform the image to black and white.
ColorSpace: TImColorspaceType;
ImageType: TImImageType;
PreviewType: TImPreviewType;
Group: Integer;
Ping: LongBool; // Set to True to read enough of the image to
// determine the image columns, rows, and
// filesize. The columns, rows, and size
// attributes are valid after invoking
// ReadImage() while ping is set. The image
// data is not valid after calling ReadImage()
// if ping is set.
Verbose: LongBool; // Print detailed information about the image
// if True.
View: PChar;
Authenticate: PChar;
Attributes: PImrImage;
ClientData: Pointer;
Cache: Pointer;
Stream: StreamHandler; // *StreamHandler
sFile: Pointer; // 'C' FILE* do not use, do not touch
Blob: Pointer;
Length: Cardinal;
Magick: packed array[0..MaxTextExtent-1] of Char;
Unique: packed array[0..MaxTextExtent-1] of Char;
Zero: packed array[0..MaxTextExtent-1] of Char;
Filename: packed array[0..MaxTextExtent-1] of Char;
{ tile depreciated }
Tile: PChar;
SubImage: Cardinal;
SubRange: Cardinal;
Pen: TImrPixelPacket;
Signature: Cardinal;
end;
// Encode/Decode Handlers
DecoderHandler = function(const ImageInfo: PImrImageInfo;
const eInfo: PImrExceptionInfo): PImrImage; cdecl;
EncoderHandler = function(const ImageInfo: PImrImageInfo;
Image: PImrImage): LongBool; cdecl;
MagickHandler = function(const Unknown: PChar;
const size: Cardinal): LongBool; cdecl;
PImrMagickInfo = ^TImrMagickInfo;
TImrMagickInfo = record
Name: PChar;
Description: PChar;
Version: PChar;
Note: PChar;
Module: Pchar;
ImageInfo: PImrImageInfo;
Decoder: DecoderHandler;
Encoder: EncoderHandler;
Magick: MagickHandler;
ClientData: Pointer;
Adjoin: LongBool;
Raw: LongBool;
Stealth: LongBool;
SeekableStream: LongBool;
BlobSupport: LongBool;
ThreadSupport: LongBool;
Signature: Cardinal;
Previous: PImrMagickInfo;
Next: PImrMagickInfo;
end;
TImPathType = (
ImRootPath, ImHeadPath, ImTailPath, ImBasePath, ImExtensionPath
);
// rendering enums
TImAlignType = (
ImUndefinedAlign, ImLeftAlign, ImCenterAlign, ImRightAlign
);
TImClipPathUnits = (
ImUserSpace, ImUserSpaceOnUse, ImObjectBoundingBox
);
TImDecorationType = (
ImNoDecoration, ImUnderlineDecoration, ImOverlineDecoration,
ImLineThroughDecoration
);
TImFillRule = (
ImUndefinedRule, ImEvenOddRule, ImNonZeroRule
);
TImGradientType = (
ImUndefinedGradient, ImLinearGradient, ImRadialGradient
);
TImLineCap = (
ImUndefinedCap, ImButtCap, ImRoundCap, ImSquareCap
);
TImLineJoin = (
ImUndefinedJoin, ImMiterJoin, ImRoundJoin, ImBevelJoin
);
TImPaintMethod = (
ImPointMethod, ImReplaceMethod, ImFloodFillMethod,
ImFillToBorderMethod, ImResetMethod
);
TImPrimitiveType = (
ImUndefinedPrimitive, ImPointPrimitive, ImLinePrimitive,
ImRectanglePrimitive, ImRoundRectanglePrimitive,
ImArcPrimitive, ImEllipsePrimitive, ImCirclePrimitive,
ImPolylinePrimitive, ImPolygonPrimtive, ImBezierPrimitive,
ImColorPrimitive, ImMattePrimitive, ImTextPrimitive,
ImImagePrimitive, ImPathPrimitive
);
TImReferenceType = (
ImUndefinedReference, ImGradientReference
);
TImSpreadMethod = (
ImUndefinedSpread, ImPadSpread, ImReflectSpread, ImRepeatSpread
);
TImStretchType = (
ImNormalStretch, ImUltraCondensedStretch, ImExtraCondensedStretch,
ImCondensedStretch, ImSemiCondensedStretch, ImSemiExpandedStretch,
ImExpandedStretch, ImExtraExpandedStretch, ImUltraExpandedStretch,
ImAnyStretch
);
TImStyleType = (
ImNormalStyle, ImItalicStyle, ImObliqueStyle, ImAnyStyle
);
// rendering structures
PImrGradientInfo = ^TImrGradientInfo;
TImrGradientInfo = record
GradientType: TImGradientType;
Color: TImrPixelPacket;
Stop: TImrSegmentInfo;
Length: Cardinal;
SpreadMethod: TImSpreadMethod;
Signature: Cardinal;
Previous: PImrGradientInfo;
Next: PImrGradientInfo;
end;
PImrElementReference = ^TImrElementReference;
TImrElementReference = record
ID: PChar;
ReferenceType: TImReferenceType;
Gradient: TImrGradientInfo;
Signature: Cardinal;
Previous: PImrElementReference;
Next: PImrElementReference;
end;
PImrDrawInfo = ^TImrDrawInfo;
TImrDrawInfo = record
Primitive: PChar;
Geometry: PChar;
Affine: TImrAffineMatrix;
Gravity: TImGravityType;
Fill: TImrPixelPacket;
Stroke: TImrPixelPacket;
StrokeWidth: Double;
Gradient: TImrGradientInfo;
FillPattern: PImrImage;
Tile: PImrImage;
StrokePattern: PImrImage;
StrokeAntialias: LongBool;
TextAntialias: LongBool;
FillRule: TImFillRule;
LineCap: TImLineCap;
LineJoin: TImLineJoin;
MiterLimit: Cardinal;
DashOffset: Double;
Decorate: TImDecorationType;
Compose: TImCompositeOperator;
Text: PChar;
Font: PChar;
Family: PChar;
Style: TImStyleType;
Stretch: TImStretchType;
Weight: Cardinal;
Encoding: PChar;
PointSize: Double;
Density: PChar;
Align: TImAlignType;
UnderColor: TImrPixelPacket;
BorderColor: TImrPixelPacket;
ServerName: PChar;
DashPattern: PDouble;
ClipPath: PChar;
Bounds: TImrSegmentInfo;
ClipUnits: TImClipPathUnits;
Opacity: Quantum;
Render: LongBool;
Debug: LongBool; // depreciated
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -