Browse Source

构建仓库

tk 5 years ago
commit
d293e84e21
45 changed files with 6534 additions and 0 deletions
  1. BIN
      CORE_RL_wand_.dll
  2. BIN
      Test01.png
  3. BIN
      lib/ImageMagick/magick/ImageMagick.dcu
  4. 118 0
      lib/ImageMagick/magick/ImageMagick.pas
  5. 52 0
      lib/ImageMagick/magick/cache_view.inc
  6. 44 0
      lib/ImageMagick/magick/compare.inc
  7. 45 0
      lib/ImageMagick/magick/constitute.inc
  8. 298 0
      lib/ImageMagick/magick/draw.inc
  9. 71 0
      lib/ImageMagick/magick/effect.inc
  10. 63 0
      lib/ImageMagick/magick/fx.inc
  11. 640 0
      lib/ImageMagick/magick/magick_type.inc
  12. 82 0
      lib/ImageMagick/magick/pixel.inc
  13. 50 0
      lib/ImageMagick/magick/quantize.inc
  14. 37 0
      lib/ImageMagick/magick/semaphore.inc
  15. 53 0
      lib/ImageMagick/magick/statistic.inc
  16. 88 0
      lib/ImageMagick/magick/type.inc
  17. 283 0
      lib/ImageMagick/wand/drawing_wand.inc
  18. 80 0
      lib/ImageMagick/wand/magick_attribute.inc
  19. 426 0
      lib/ImageMagick/wand/magick_image.inc
  20. BIN
      lib/ImageMagick/wand/magick_wand.dcu
  21. 74 0
      lib/ImageMagick/wand/magick_wand.pas
  22. 74 0
      lib/ImageMagick/wand/pixel_iterator.inc
  23. 109 0
      lib/ImageMagick/wand/pixel_wand.inc
  24. 1966 0
      lib/ZBar.pas
  25. BIN
      libMagickCore-2.dll
  26. BIN
      libiconv-2.dll
  27. BIN
      libjpeg-7.dll
  28. BIN
      libpng12-0.dll
  29. BIN
      libtiff-3.dll
  30. BIN
      libxml2-2.dll
  31. BIN
      libzbar-0.dll
  32. BIN
      qr-code.png
  33. 195 0
      src/ZBar01.bdsproj
  34. 11 0
      src/ZBar01.bdsproj.local
  35. 41 0
      src/ZBar01.cfg
  36. 17 0
      src/ZBar01.dpr
  37. 142 0
      src/ZBar01.dproj
  38. 11 0
      src/ZBar01.dproj.local
  39. 654 0
      src/ZBar01.dsk
  40. BIN
      src/ZBar01.identcache
  41. BIN
      src/ZBar01.res
  42. 10 0
      src/ZBar01.stat
  43. 123 0
      src/fMain.dfm
  44. 677 0
      src/fMain.pas
  45. BIN
      zlib1.dll

BIN
CORE_RL_wand_.dll


BIN
Test01.png


BIN
lib/ImageMagick/magick/ImageMagick.dcu


+ 118 - 0
lib/ImageMagick/magick/ImageMagick.pas

@@ -0,0 +1,118 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick Application Programming Interface declarations.
+  
+  Converted from c by: Felipe Monteiro de Carvalho Dez/2005
+
+	Bug-fixed by Ángel Eduardo García Hernández
+	Thanks to Marc Geldon and RuBBeR
+}
+{Version 0.4}
+unit ImageMagick;
+
+{$ifdef FPC}
+  {$mode objfpc}
+	{$PACKRECORDS C}
+{$endif}
+
+interface
+
+uses SysUtils;
+
+{$MINENUMSIZE 1}
+
+const
+{$ifdef Win32}
+  WandExport = 'CORE_RL_wand_.dll';
+{$else}
+  WandExport = 'libWand';
+{$endif}
+
+{# include "magick/methods.h"
+#endif}
+{$include magick_type.inc}
+{$include type.inc}
+
+{#$include animate.inc}
+{#$include annotate.inc}
+{#$include attribute.inc}
+{#$include blob.inc}
+{#$include cache.inc}
+{$include cache_view.inc}
+{#include "magick/coder.h"
+#include "magick/client.h"
+#include "magick/color.h"
+#include "magick/colorspace.h"}
+{$include compare.inc}
+{#include "magick/composite.h"
+#include "magick/compress.h"
+#include "magick/configure.h"
+#include "magick/conjure.h"}
+{$include constitute.inc}
+{#include "magick/convert.h"
+#include "magick/decorate.h"
+#include "magick/delegate.h"
+#include "magick/deprecate.h"
+#include "magick/display.h"}
+{$include draw.inc}
+{$include effect.inc}
+{#include "magick/enhance.h"
+#include "magick/exception.h"}
+{$include fx.inc}
+{#include "magick/gem.h"
+#include "magick/geometry.h"
+#include "magick/hashmap.h"
+#include "magick/identify.h"
+#include "magick/image.h"
+#include "magick/import.h"
+#include "magick/list.h"
+#include "magick/locale_.h"
+#include "magick/log.h"
+#include "magick/magic.h"
+#include "magick/magick.h"
+#include "magick/memory_.h"
+#include "magick/module.h"
+#include "magick/mogrify.h"
+#include "magick/monitor.h"
+#include "magick/montage.h"
+#include "magick/option.h"
+#include "magick/paint.h"}
+{$include pixel.inc}
+{#include "magick/prepress.h"
+#include "magick/profile.h"}
+{$include quantize.inc}
+{#include "magick/quantum.h"
+#include "magick/registry.h"
+#include "magick/random_.h"
+#include "magick/resize.h"
+#include "magick/resource_.h"
+#include "magick/segment.h"
+#include "magick/shear.h"
+#include "magick/signature.h"
+#include "magick/splay-tree.h"
+#include "magick/stream.h"}
+{$include statistic.inc}
+{#include "magick/string_.h"
+#include "magick/timer.h"
+#include "magick/token.h"
+#include "magick/transform.h"
+#include "magick/utility.h"
+#include "magick/version.h"
+#include "magick/xwindow.h"}
+
+implementation
+
+end.

+ 52 - 0
lib/ImageMagick/magick/cache_view.inc

@@ -0,0 +1,52 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick Cache View Methods.
+}
+
+type
+  ViewInfo = record
+    image: PImage;
+
+    id: Cardinal;
+
+    signature: Cardinal;
+  end;
+  
+  PViewInfo = ^ViewInfo;
+
+{extern MagickExport const PixelPacket
+  *AcquireCacheView(const ViewInfo *,const long,const long,const unsigned long,
+    const unsigned long,ExceptionInfo *);
+
+extern MagickExport IndexPacket
+  *GetCacheViewIndexes(const ViewInfo *);
+
+extern MagickExport MagickBooleanType
+  SyncCacheView(ViewInfo *);
+
+extern MagickExport PixelPacket
+  *GetCacheViewPixels(const ViewInfo *),
+  *GetCacheView(ViewInfo *,const long,const long,const unsigned long,
+    const unsigned long),
+  *SetCacheView(ViewInfo *,const long,const long,const unsigned long,
+    const unsigned long);
+
+extern MagickExport ViewInfo
+  *OpenCacheView(Image *);
+
+extern MagickExport void
+  CloseCacheView(ViewInfo *);}
+

+ 44 - 0
lib/ImageMagick/magick/compare.inc

@@ -0,0 +1,44 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image compare methods.
+}
+
+//#include "magick/image.h"
+
+type
+ MetricType = (
+  UndefinedMetric,
+  MeanAbsoluteErrorMetric,
+  MeanSquaredErrorMetric,
+  PeakAbsoluteErrorMetric,
+  PeakSignalToNoiseRatioMetric,
+  RootMeanSquaredErrorMetric
+ );
+
+{extern MagickExport Image
+  *CompareImageChannels(Image *,const Image *,const ChannelType,
+    const MetricType,double *,ExceptionInfo *),
+  *CompareImages(Image *,const Image *,const MetricType,double *,
+    ExceptionInfo *);
+
+extern MagickExport MagickBooleanType
+  CompareImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *),
+  GetImageChannelDistortion(Image *,const Image *,const ChannelType,
+    const MetricType,double *,ExceptionInfo *),
+  GetImageDistortion(Image *,const Image *,const MetricType,double *,
+    ExceptionInfo *),
+  IsImagesEqual(Image *,const Image *);}
+

+ 45 - 0
lib/ImageMagick/magick/constitute.inc

@@ -0,0 +1,45 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image constitute methods.
+}
+
+type
+ StorageType = (
+  UndefinedPixel,
+  CharPixel,
+  DoublePixel,
+  FloatPixel,
+  IntegerPixel,
+  LongPixel,
+  QuantumPixel,
+  ShortPixel
+ );
+
+{extern MagickExport Image
+  *ConstituteImage(const unsigned long,const unsigned long,const char *,
+    const StorageType,const void *,ExceptionInfo *),
+  *PingImage(const ImageInfo *,ExceptionInfo *),
+  *ReadImage(const ImageInfo *,ExceptionInfo *),
+  *ReadInlineImage(const ImageInfo *,const char *,ExceptionInfo *);
+
+extern MagickExport MagickBooleanType
+  WriteImage(const ImageInfo *,Image *),
+  WriteImages(const ImageInfo *,Image *,const char *,ExceptionInfo *);
+
+extern MagickExport void
+  DestroyConstitute(void);}
+
+

+ 298 - 0
lib/ImageMagick/magick/draw.inc

@@ -0,0 +1,298 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick drawing methods.
+}
+
+//#include "magick/type.h"
+
+type
+ AlignType = (
+  UndefinedAlign,
+  LeftAlign,
+  CenterAlign,
+  RightAlign
+ );
+
+type
+ ClipPathUnits = (
+  UndefinedPathUnits,
+  UserSpace,
+  UserSpaceOnUse,
+  ObjectBoundingBox
+ );
+
+type
+ DecorationType = (
+  UndefinedDecoration,
+  NoDecoration,
+  UnderlineDecoration,
+  OverlineDecoration,
+  LineThroughDecoration
+ );
+
+type
+ FillRule = (
+  UndefinedRule,
+//#undef EvenOddRule
+  EvenOddRule,
+  NonZeroRule
+ );
+
+type
+ GradientType = (
+  UndefinedGradient,
+  LinearGradient,
+  RadialGradient
+ );
+
+type
+ LineCap = (
+  UndefinedCap,
+  ButtCap,
+  RoundCap,
+  SquareCap
+ );
+
+type
+ LineJoin = (
+  UndefinedJoin,
+  MiterJoin,
+  RoundJoin,
+  BevelJoin
+ );
+
+type
+ PaintMethod = (
+  UndefinedMethod,
+  PointMethod,
+  ReplaceMethod,
+  FloodfillMethod,
+  FillToBorderMethod,
+  ResetMethod
+ );
+
+type
+ PrimitiveType = (
+  UndefinedPrimitive,
+  PointPrimitive,
+  LinePrimitive,
+  RectanglePrimitive,
+  RoundRectanglePrimitive,
+  ArcPrimitive,
+  EllipsePrimitive,
+  CirclePrimitive,
+  PolylinePrimitive,
+  PolygonPrimitive,
+  BezierPrimitive,
+  ColorPrimitive,
+  MattePrimitive,
+  TextPrimitive,
+  ImagePrimitive,
+  PathPrimitive
+ );
+
+type
+ ReferenceType = (
+  UndefinedReference,
+  GradientReference
+ );
+
+type
+ SpreadMethod = (
+  UndefinedSpread,
+  PadSpread,
+  ReflectSpead,
+  RepeatSpread
+ );
+
+type
+  GradientInfo = record
+    type_: GradientType;
+
+    color: PixelPacket;
+
+    stop: SegmentInfo;
+
+    length: Cardinal;
+
+    spread: SpreadMethod;
+
+    debug: MagickBooleanType;
+
+    signature: Cardinal;
+
+    previous, next: Pointer;
+{  struct _GradientInfo
+    *previous,
+    *next;}
+  end;
+
+type
+  ElementReference = record
+    id: PAnsiChar;
+
+    type_: ReferenceType;
+
+    gradient: GradientInfo;
+
+    signature: Cardinal;
+
+    previous, next: Pointer;
+{  struct _ElementReference
+    *previous,
+    *next;}
+  end;
+
+type
+  DrawInfo = record
+    primitive,
+    geometry: PAnsiChar;
+
+    viewbox: RectangleInfo;
+
+    affine: AffineMatrix;
+
+    gravity: GravityType;
+
+    fill,
+    stroke: PixelPacket;
+
+    stroke_width: double;
+
+    gradient: GradientInfo;
+
+    fill_pattern,
+    tile,
+    stroke_pattern: PImage;
+
+    stroke_antialias,
+    text_antialias: MagickBooleanType;
+
+    fill_rule: FillRule;
+
+    linecap_: LineCap;
+
+    linejoin_: LineJoin;
+
+    miterlimit: Cardinal;
+
+    dash_offset: double;
+
+    decorate: DecorationType;
+
+    compose: CompositeOperator;
+
+    text: PAnsiChar;
+
+    face: Cardinal;
+
+    font,
+    metrics,
+    family: PAnsiChar;
+
+    style: StyleType;
+
+    stretch: StretchType;
+
+    weight: Cardinal;
+    
+    encoding: PAnsiChar;
+
+    pointsize: double;
+
+    density: PAnsiChar;
+
+    align: AlignType;
+
+    undercolor,
+    border_color: PixelPacket;
+
+    server_name: PAnsiChar;
+
+    dash_pattern: Pdouble;
+
+    clip_path: PAnsiChar;
+
+    bounds: SegmentInfo;
+
+    clip_units: ClipPathUnits;
+
+    opacity: Quantum;
+
+    render: MagickBooleanType;
+
+    element_reference: ElementReference;
+
+    debug: MagickBooleanType;
+
+    signature: Cardinal;
+  end;
+  
+  PDrawInfo = ^DrawInfo;
+  
+  PPDrawInfo = ^PDrawInfo;
+
+type
+  PointInfo = record
+    x, y: double;
+  end;
+  
+  PPointInfo = ^PointInfo;
+
+type
+  PrimitiveInfo = record
+    point: PointInfo;
+
+    coordinates: Cardinal;
+
+    primitive: PrimitiveType;
+
+    method: PaintMethod;
+
+    text: PAnsiChar;
+  end;
+
+type
+  TypeMetric = record
+    pixels_per_em: PointInfo;
+
+    ascent,
+    descent,
+    width,
+    height,
+    max_advance,
+    underline_position,
+    underline_thickness: double;
+
+    bounds: SegmentInfo;
+  end;
+
+{extern MagickExport DrawInfo
+  *CloneDrawInfo(const ImageInfo *,const DrawInfo *),
+  *DestroyDrawInfo(DrawInfo *);
+
+extern MagickExport MagickBooleanType
+  DrawAffineImage(Image *,const Image *,const AffineMatrix *),
+  DrawClipPath(Image *,const DrawInfo *,const char *),
+  DrawImage(Image *,const DrawInfo *),
+  DrawPatternPath(Image *,const DrawInfo *,const char *,Image **),
+  DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *);
+
+extern MagickExport void
+  GetAffineMatrix(AffineMatrix *),
+  GetDrawInfo(const ImageInfo *,DrawInfo *);}
+
+

+ 71 - 0
lib/ImageMagick/magick/effect.inc

@@ -0,0 +1,71 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image effects methods.
+}
+
+type
+  NoiseType = ( 
+  UndefinedNoise,
+  UniformNoise,
+  GaussianNoise,
+  MultiplicativeGaussianNoise,
+  ImpulseNoise,
+  LaplacianNoise,
+  PoissonNoise
+ );
+
+{extern MagickExport Image
+  *AdaptiveThresholdImage(const Image *,const unsigned long,const unsigned long,    const long,ExceptionInfo *),
+  *AddNoiseImage(const Image *,const NoiseType,ExceptionInfo *),
+  *AddNoiseImageChannel(const Image *,const ChannelType,const NoiseType,
+    ExceptionInfo *),
+  *BlurImage(const Image *,const double,const double,ExceptionInfo *),
+  *BlurImageChannel(const Image *,const ChannelType,const double,const double,
+    ExceptionInfo *),
+  *DespeckleImage(const Image *,ExceptionInfo *),
+  *EdgeImage(const Image *,const double,ExceptionInfo *),
+  *EmbossImage(const Image *,const double,const double,ExceptionInfo *),
+  *GaussianBlurImage(const Image *,const double,const double,ExceptionInfo *),
+  *GaussianBlurImageChannel(const Image *,const ChannelType,const double,
+    const double,ExceptionInfo *),
+  *MedianFilterImage(const Image *,const double,ExceptionInfo *),
+  *MotionBlurImage(const Image *,const double,const double,const double,
+    ExceptionInfo *),
+  *PreviewImage(const Image *,const PreviewType,ExceptionInfo *),
+  *RadialBlurImage(const Image *,const double,ExceptionInfo *),
+  *RadialBlurImageChannel(const Image *,const ChannelType,const double,
+    ExceptionInfo *),
+  *ReduceNoiseImage(const Image *,const double,ExceptionInfo *),
+  *ShadeImage(const Image *,const MagickBooleanType,const double,const double,
+    ExceptionInfo *),
+  *SharpenImage(const Image *,const double,const double,ExceptionInfo *),
+  *SharpenImageChannel(const Image *,const ChannelType,const double,
+    const double,ExceptionInfo *),
+  *SpreadImage(const Image *,const double,ExceptionInfo *),
+  *UnsharpMaskImage(const Image *,const double,const double,const double,
+    const double,ExceptionInfo *),
+  *UnsharpMaskImageChannel(const Image *,const ChannelType,const double,
+    const double,const double,const double,ExceptionInfo *);
+
+extern MagickExport MagickBooleanType
+  BlackThresholdImage(Image *,const char *),
+  BilevelImage(Image *,const double),
+  BilevelImageChannel(Image *,const ChannelType,const double),
+  RandomThresholdImage(Image *,const char *,ExceptionInfo *),
+  RandomThresholdImageChannel(Image *,const ChannelType,const char *,
+    ExceptionInfo *),
+  WhiteThresholdImage(Image *,const char *);}
+

+ 63 - 0
lib/ImageMagick/magick/fx.inc

@@ -0,0 +1,63 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image f/x methods.
+}
+
+type
+ MagickEvaluateOperator = (
+  UndefinedEvaluateOperator,
+  AddEvaluateOperator,
+  AndEvaluateOperator,
+  DivideEvaluateOperator,
+  LeftShiftEvaluateOperator,
+  MaxEvaluateOperator,
+  MinEvaluateOperator,
+  MultiplyEvaluateOperator,
+  OrEvaluateOperator,
+  RightShiftEvaluateOperator,
+  SetEvaluateOperator,
+  SubtractEvaluateOperator,
+  XorEvaluateOperator
+ );
+
+{extern MagickExport Image
+  *CharcoalImage(const Image *,const double,const double,ExceptionInfo *),
+  *ColorizeImage(const Image *,const char *,const PixelPacket,ExceptionInfo *),
+  *ConvolveImage(const Image *,const unsigned long,const double *,
+    ExceptionInfo *),
+  *ConvolveImageChannel(const Image *,const ChannelType,const unsigned long,
+    const double *,ExceptionInfo *),
+  *FxImage(const Image *,const char *,ExceptionInfo *),
+  *FxImageChannel(const Image *,const ChannelType,const char *,ExceptionInfo *),
+  *ImplodeImage(const Image *,const double,ExceptionInfo *),
+  *MorphImages(const Image *,const unsigned long,ExceptionInfo *),
+  *OilPaintImage(const Image *,const double,ExceptionInfo *),
+  *SepiaToneImage(const Image *,const double,ExceptionInfo *),
+  *ShadowImage(const Image *,const double,const double,const long,const long,
+    ExceptionInfo *),
+  *SteganoImage(const Image *,const Image *,ExceptionInfo *),
+  *StereoImage(const Image *,const Image *,ExceptionInfo *),
+  *SwirlImage(const Image *,double,ExceptionInfo *),
+  *TintImage(const Image *,const char *,const PixelPacket,ExceptionInfo *),
+  *WaveImage(const Image *,const double,const double,ExceptionInfo *);
+
+extern MagickExport MagickBooleanType
+  EvaluateImage(Image *,const MagickEvaluateOperator,const double,
+    ExceptionInfo *),
+  EvaluateImageChannel(Image *,const ChannelType,const MagickEvaluateOperator,
+    const double,ExceptionInfo *),
+  SolarizeImage(Image *,const double);}
+

+ 640 - 0
lib/ImageMagick/magick/magick_type.inc

@@ -0,0 +1,640 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick structure members.
+
+  NOTE: This is a simplifyed version of magick/magick-type.h
+}
+
+const MaxTextExtent = 4096;
+
+const
+  MagickFalse = 0;
+  MagickTrue = 1;
+
+type
+  MagickBooleanType = Cardinal;
+
+  PMagickBooleanType = ^MagickBooleanType;
+
+//#include "magick/semaphore.h"
+
+{
+  The Quantum Depth was fixed at 16 to make the code simpler
+
+  In the future there is the possibility to go to the c bindings
+ and implement the variable QuantumDepth here
+}
+const
+  QuantumDepth = 16;
+
+{$define QuantumLeap}
+
+const
+  MagickEpsilon = 1.0E-10;
+  MaxColormapSize = 65536;
+  MaxMap = 65535;
+  QuantumFormat = '%u';
+  QuantumRange = 65535;
+
+type
+  MagickRealType = double;
+  Quantum = Word;
+
+{
+  Type declarations.
+}
+type
+  MagickStatusType = Word;
+  MagickOffsetType = Int64;
+  MagickSizeType = Int64;
+
+const
+  UndefinedChannel = 0;
+  RedChannel = $0001;
+  GrayChannel = $0001;
+  CyanChannel = $0001;
+  GreenChannel = $0002;
+  MagentaChannel = $0002;
+  BlueChannel = $0004;
+  YellowChannel = $0004;
+  AlphaChannel = $0008;
+  OpacityChannel = $0008;
+  MatteChannel = $0008;  // deprecated
+  BlackChannel = $0020;
+  IndexChannel = $0020;
+  AllChannels = $ff;
+  
+type
+  ChannelType = Byte;
+
+  PChannelType = ^ChannelType;
+
+type
+ ClassType = (
+  UndefinedClass,
+  DirectClass,
+  PseudoClass
+ );
+
+  PClassType = ^ClassType;
+
+type
+ ColorspaceType = (
+  UndefinedColorspace,
+  RGBColorspace,
+  GRAYColorspace,
+  TransparentColorspace,
+  OHTAColorspace,
+  LABColorspace,
+  XYZColorspace,
+  YCbCrColorspace,
+  YCCColorspace,
+  YIQColorspace,
+  YPbPrColorspace,
+  YUVColorspace,
+  CMYKColorspace,
+  sRGBColorspace,
+  HSBColorspace,
+  HSLColorspace,
+  HWBColorspace,
+  Rec601LumaColorspace,
+  Rec709LumaColorspace,
+  LogColorspace
+ );
+
+  PColorspaceType = ^ColorspaceType;
+
+type
+ CompositeOperator = (
+  UndefinedCompositeOp,
+  NoCompositeOp,
+  AddCompositeOp,
+  AtopCompositeOp,
+  BlendCompositeOp,
+  BumpmapCompositeOp,
+  ClearCompositeOp,
+  ColorBurnCompositeOp,
+  ColorDodgeCompositeOp,
+  ColorizeCompositeOp,
+  CopyBlackCompositeOp,
+  CopyBlueCompositeOp,
+  CopyCompositeOp,
+  CopyCyanCompositeOp,
+  CopyGreenCompositeOp,
+  CopyMagentaCompositeOp,
+  CopyOpacityCompositeOp,
+  CopyRedCompositeOp,
+  CopyYellowCompositeOp,
+  DarkenCompositeOp,
+  DstAtopCompositeOp,
+  DstCompositeOp,
+  DstInCompositeOp,
+  DstOutCompositeOp,
+  DstOverCompositeOp,
+  DifferenceCompositeOp,
+  DisplaceCompositeOp,
+  DissolveCompositeOp,
+  ExclusionCompositeOp,
+  HardLightCompositeOp,
+  HueCompositeOp,
+  InCompositeOp,
+  LightenCompositeOp,
+  LuminizeCompositeOp,
+  MinusCompositeOp,
+  ModulateCompositeOp,
+  MultiplyCompositeOp,
+  OutCompositeOp,
+  OverCompositeOp,
+  OverlayCompositeOp,
+  PlusCompositeOp,
+  ReplaceCompositeOp,
+  SaturateCompositeOp,
+  ScreenCompositeOp,
+  SoftLightCompositeOp,
+  SrcAtopCompositeOp,
+  SrcCompositeOp,
+  SrcInCompositeOp,
+  SrcOutCompositeOp,
+  SrcOverCompositeOp,
+  SubtractCompositeOp,
+  ThresholdCompositeOp,
+  XorCompositeOp
+ );
+
+  PCompositeOperator = ^CompositeOperator;
+
+type
+ CompressionType = (
+  UndefinedCompression,
+  NoCompression,
+  BZipCompression,
+  FaxCompression,
+  Group4Compression,
+  JPEGCompression,
+  JPEG2000Compression,
+  LosslessJPEGCompression,
+  LZWCompression,
+  RLECompression,
+  ZipCompression
+ );
+
+  PCompressionType = ^CompressionType;
+  
+const
+  UnrecognizedDispose = 0;
+  UndefinedDispose = 0;
+  NoneDispose = 1;
+  BackgroundDispose = 2;
+  PreviousDispose = 3;
+
+type
+  DisposeType = Byte;
+
+  PDisposeType = ^DisposeType;
+  
+type
+ EndianType = (
+  UndefinedEndian,
+  LSBEndian,
+  MSBEndian
+ );
+
+  PEndianType = ^EndianType;
+
+const
+  UndefinedException = 0;
+  WarningException = 300;
+  ResourceLimitWarning = 300;
+  TypeWarning = 305;
+  OptionWarning = 310;
+  DelegateWarning = 315;
+  MissingDelegateWarning = 320;
+  CorruptImageWarning = 325;
+  FileOpenWarning = 330;
+  BlobWarning = 335;
+  StreamWarning = 340;
+  CacheWarning = 345;
+  CoderWarning = 350;
+  ModuleWarning = 355;
+  DrawWarning = 360;
+  ImageWarning = 365;
+  WandWarning = 370;
+  XServerWarning = 380;
+  MonitorWarning = 385;
+  RegistryWarning = 390;
+  ConfigureWarning = 395;
+  ErrorException = 400;
+  ResourceLimitError = 400;
+  TypeError = 405;
+  OptionError = 410;
+  DelegateError = 415;
+  MissingDelegateError = 420;
+  CorruptImageError = 425;
+  FileOpenError = 430;
+  BlobError = 435;
+  StreamError = 440;
+  CacheError = 445;
+  CoderError = 450;
+  ModuleError = 455;
+  DrawError = 460;
+  ImageError = 465;
+  WandError = 470;
+  XServerError = 480;
+  MonitorError = 485;
+  RegistryError = 490;
+  ConfigureError = 495;
+  FatalErrorException = 700;
+  ResourceLimitFatalError = 700;
+  TypeFatalError = 705;
+  OptionFatalError = 710;
+  DelegateFatalError = 715;
+  MissingDelegateFatalError = 720;
+  CorruptImageFatalError = 725;
+  FileOpenFatalError = 730;
+  BlobFatalError = 735;
+  StreamFatalError = 740;
+  CacheFatalError = 745;
+  CoderFatalError = 750;
+  ModuleFatalError = 755;
+  DrawFatalError = 760;
+  ImageFatalError = 765;
+  WandFatalError = 770;
+  XServerFatalError = 780;
+  MonitorFatalError = 785;
+  RegistryFatalError = 790;
+  ConfigureFatalError = 795;
+  
+type
+  ExceptionType = Word;
+  
+  PExceptionType = ^ExceptionType;
+
+type
+ FilterTypes = (
+  UndefinedFilter,
+  PointFilter,
+  BoxFilter,
+  TriangleFilter,
+  HermiteFilter,
+  HanningFilter,
+  HammingFilter,
+  BlackmanFilter,
+  GaussianFilter,
+  QuadraticFilter,
+  CubicFilter,
+  CatromFilter,
+  MitchellFilter,
+  LanczosFilter,
+  BesselFilter,
+  SincFilter
+ );
+
+  PFilterTypes = ^FilterTypes;
+
+const
+  UndefinedGravity = 0;
+  ForgetGravity = 0;
+  NorthWestGravity = 1;
+  NorthGravity = 2;
+  NorthEastGravity = 3;
+  WestGravity = 4;
+  CenterGravity = 5;
+  EastGravity = 6;
+  SouthWestGravity = 7;
+  SouthGravity = 8;
+  SouthEastGravity = 9;
+  StaticGravity = 10;
+
+type
+  GravityType = Byte;
+
+  PGravityType = ^GravityType;
+
+type ImageType = (
+  UndefinedType,
+  BilevelType,
+  GrayscaleType,
+  GrayscaleMatteType,
+  PaletteType,
+  PaletteMatteType,
+  TrueColorType,
+  TrueColorMatteType,
+  ColorSeparationType,
+  ColorSeparationMatteType,
+  OptimizeType
+ );
+
+  PImageType = ^ImageType;
+
+type
+ InterlaceType = (
+  UndefinedInterlace,
+  NoInterlace,
+  LineInterlace,
+  PlaneInterlace,
+  PartitionInterlace
+ );
+
+  PInterlaceType = ^InterlaceType;
+
+type
+ OrientationType = (
+  UndefinedOrientation,
+  TopLeftOrientation,
+  TopRightOrientation,
+  BottomRightOrientation,
+  BottomLeftOrientation,
+  LeftTopOrientation,
+  RightTopOrientation,
+  RightBottomOrientation,
+  LeftBottomOrientation
+ );
+
+  POrientationType = ^OrientationType;
+
+type PreviewType = (
+  UndefinedPreview,
+  RotatePreview,
+  ShearPreview,
+  RollPreview,
+  HuePreview,
+  SaturationPreview,
+  BrightnessPreview,
+  GammaPreview,
+  SpiffPreview,
+  DullPreview,
+  GrayscalePreview,
+  QuantizePreview,
+  DespecklePreview,
+  ReduceNoisePreview,
+  AddNoisePreview,
+  SharpenPreview,
+  BlurPreview,
+  ThresholdPreview,
+  EdgeDetectPreview,
+  SpreadPreview,
+  SolarizePreview,
+  ShadePreview,
+  RaisePreview,
+  SegmentPreview,
+  SwirlPreview,
+  ImplodePreview,
+  WavePreview,
+  OilPaintPreview,
+  CharcoalDrawingPreview,
+  JPEGPreview
+ );
+
+  PPreviewType = ^PreviewType;
+
+type RenderingIntent = (
+  UndefinedIntent,
+  SaturationIntent,
+  PerceptualIntent,
+  AbsoluteIntent,
+  RelativeIntent
+ );
+
+  PRenderingIntent = ^RenderingIntent;
+
+type ResolutionType = (
+  UndefinedResolution,
+  PixelsPerInchResolution,
+  PixelsPerCentimeterResolution
+ );
+
+  PResolutionType = ^ResolutionType;
+
+type TimerState = (
+  UndefinedTimerState,
+  StoppedTimerState,
+  RunningTimerState
+ );
+
+  PTimerState = ^TimerState;
+
+type
+  AffineMatrix = record
+    sx, rx, ry, sy, tx, ty: double;
+  end;
+  
+  PAffineMatrix = ^AffineMatrix;
+
+type
+ IndexPacket = Quantum;
+
+type
+  PixelPacket = record
+{$ifdef WORDS_BIGENDIAN}
+   red, green, blue, opacity: Quantum;
+{$else}
+   blue, green, red, opacity: Quantum;
+{$endif}
+  end;
+  
+  PPixelPacket = ^PixelPacket;
+
+type
+  ColorPacket = record
+   pixel: PixelPacket;
+   index: IndexPacket;
+   count: Cardinal;
+  end;
+  
+  PColorPacket = ^ColorPacket;
+
+type
+  ErrorInfo = record
+   mean_error_per_pixel, normalized_mean_error, normalized_maximum_error: double;
+  end;
+
+type
+  PrimaryInfo = record
+   x, y, z: double;
+  end;
+
+type 
+  ProfileInfo = record
+   name: PChar;
+   length: Integer;
+   info: PChar;
+   signature: Cardinal;
+  end;
+  
+  PProfileInfo = ^ProfileInfo;
+
+type 
+  RectangleInfo = record
+   width, height: Cardinal;
+   x, y: Cardinal;
+  end;
+
+type
+  SegmentInfo = record
+   x1, y1, x2, y2: double;
+  end;
+
+type
+  Timer = record
+   start, stop, total: double;
+  end;
+  
+  PTimer = ^Timer;
+
+type
+  TimerInfo = record
+   user, elapsed: Timer;
+   state: TimerState;
+   signature: Cardinal;
+  end;
+  
+  PTimerInfo = ^TimerInfo;
+
+type
+  ChromaticityInfo = record
+   red_primary, green_primary, blue_primary, white_point: PrimaryInfo;
+ end;
+
+type
+  ExceptionInfo = record
+   //severity: ExceptionType;
+   //error_number: Shortint;
+   severity: Cardinal;
+   error_number: Cardinal;
+   reason, description: PChar;
+	 exceptions: Pointer;
+	 relinquish: MagickBooleanType;
+   semaphore: Pointer; //PSemaphoreInfo;
+   signature: Cardinal;
+  end;
+  
+  PExceptionInfo = ^ExceptionInfo;
+
+//typedef struct _Ascii85Info _Ascii85Info_;
+
+//typedef struct _BlobInfo _BlobInfo_;
+
+type
+  MagickProgressMonitor = function (const str: PChar; const para: MagickOffsetType;
+   const sizetype: MagickSizeType; param: Pointer): PMagickBooleanType;
+
+type
+  Image = record
+   storage_class: ClassType;
+   colorspace: ColorspaceType;
+   compression: CompressionType;
+   quality: Cardinal;
+   orientation: OrientationType;
+   taint, matte: MagickBooleanType;
+   columns, rows, depth, colors: Cardinal;
+   colormap: PPixelPacket;
+   background_color, border_color, matte_color: PixelPacket;
+   gamma: double;
+   chromaticity: ChromaticityInfo;
+   rendering_intent: RenderingIntent;
+   profiles: Pointer;
+   units: ResolutionType;
+   montage, directory, geometry: PChar;
+   offset: Integer;
+   x_resolution, y_resolution: double;
+   page, extract_info, tile_info: RectangleInfo;  // deprecated
+   bias, blur, fuzz: double;
+   filter: FilterTypes;
+   interlace: InterlaceType;
+   endian: EndianType;
+   gravity: GravityType;
+   compose: CompositeOperator;
+   dispose: DisposeType;
+   clip_mask: Pointer; // PImage
+   scene, delay, ticks_per_second, iterations, total_colors: Cardinal;
+   start_loop: Integer;
+   error: ErrorInfo;
+   timer: TimerInfo;
+   progress_monitor: MagickProgressMonitor;
+   client_data: Pointer;
+   cache: Pointer;
+   attributes: Pointer;
+   ascii85: Pointer; //_Ascii85Info_
+   blob: Pointer; // _BlobInfo_
+   filename, magick_filename, magick: array[1..MaxTextExtent] of char;
+   magick_columns, magick_rows: Cardinal;
+   exception: ExceptionInfo;
+   debug: MagickBooleanType;
+   reference_count: Longint;
+   semaphore: Pointer; //PSemaphoreInfo;
+   color_profile, iptc_profile: ProfileInfo;
+   generic_profile: PProfileInfo;
+   generic_profiles: Cardinal;  // this & ProfileInfo is deprecated
+   signature: Cardinal;
+   previous, list, next: Pointer;
+{  struct _Image
+    *previous,
+    *list,
+    *next;}
+ end;
+ 
+ PImage = ^Image;
+
+//type
+//  size_t = PStreamHandler(procedure (const image: PImage;
+//   const param: Pointer; const) );
+
+type
+  ImageInfo = record
+   compression: CompressionType;
+   orientation: OrientationType;
+   temporary, adjoin, affirm, antialias: MagickBooleanType;
+   size, extract, page, scenes: PChar;
+   scene, number_scenes, depth: Cardinal;
+   interlace: InterlaceType;
+   endian: EndianType;
+   units: ResolutionType;
+   quality: Cardinal;
+   sampling_factor, server_name, font, texture, density: PChar;
+   pointsize, fuzz: double;
+   background_color, border_color, matte_color: PixelPacket;
+   dither, monochrome: MagickBooleanType;
+   colors: Cardinal;
+   colorspace: ColorspaceType;
+   type_: ImageType ;
+   preview_type: PreviewType;
+   group: Longint;
+   ping, verbose: MagickBooleanType;
+   view, authenticate: PChar;
+   channel: ChannelType;
+   attributes: PImage;
+   options: Pointer;
+   progress_monitor: MagickProgressMonitor;
+   client_data, cache: Pointer;
+   stream: Cardinal; //StreamHandler;
+   file_: Pointer; // *file
+   blob: Pointer;
+   length: Integer;
+   magick, unique, zero, filename: array[1..MaxTextExtent] of char;
+   debug: MagickBooleanType;
+
+  {
+    Deprecated.
+  }
+   tile: PChar;
+   subimage, subrange: Cardinal;
+   pen: PixelPacket;
+   signature: Cardinal;
+ end;
+
+  PImageInfo = ^ImageInfo;
+
+

+ 82 - 0
lib/ImageMagick/magick/pixel.inc

@@ -0,0 +1,82 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image constitute methods.
+}
+
+//#include <magick/constitute.h>
+
+type
+  QuantumType = (
+  UndefinedQuantum,
+  AlphaQuantum,
+  BlackQuantum,
+  BlueQuantum,
+  CMYKAQuantum,
+  CMYKQuantum,
+  CyanQuantum,
+  GrayAlphaQuantum,
+  GrayQuantum,
+  GreenQuantum,
+  IndexAlphaQuantum,
+  IndexQuantum,
+  MagentaQuantum,
+  OpacityQuantum,
+  RedQuantum,
+  RGBAQuantum,
+  RGBOQuantum,
+  RGBQuantum,
+  YellowQuantum,
+  GrayPadQuantum,
+  RGBPadQuantum
+ );
+
+type
+  LongPixelPacket = record
+    red,
+    green,
+    blue,
+    opacity,
+    index: Cardinal;
+  end;
+
+type
+  MagickPixelPacket = record
+    colorspace: ColorspaceType;
+
+    matte: MagickBooleanType;
+
+    fuzz: double;
+
+    depth: Cardinal;
+
+    red,
+    green,
+    blue,
+    opacity,
+    index: MagickRealType;
+  end;
+
+  PMagickPixelPacket = ^MagickPixelPacket;
+
+{extern MagickExport MagickBooleanType
+  ExportImagePixels(const Image *,const long,const long,const unsigned long,
+    const unsigned long,const char *,const StorageType,void *,ExceptionInfo *),
+  ExportQuantumPixels(Image *,const QuantumType,const size_t,
+    const unsigned char *),
+  ImportImagePixels(Image *,const long,const long,const unsigned long,
+    const unsigned long,const char *,const StorageType,const void *),
+  ImportQuantumPixels(Image *,const QuantumType,const size_t,unsigned char *);}
+

+ 50 - 0
lib/ImageMagick/magick/quantize.inc

@@ -0,0 +1,50 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image quantization methods.
+}
+
+type
+  QuantizeInfo = record
+    number_colors: Cardinal;
+
+    tree_depth: Cardinal;
+
+    dither: MagickBooleanType;
+
+    colorspace: ColorspaceType;
+
+    measure_error: MagickBooleanType;
+
+    signature: Cardinal;
+  end;
+	PQuantizeInfo = ^QuantizeInfo;
+
+{extern MagickExport MagickBooleanType
+  GetImageQuantizeError(Image *),
+  MapImage(Image *,const Image *,const MagickBooleanType),
+  MapImages(Image *,const Image *,const MagickBooleanType),
+  OrderedDitherImage(Image *),
+  PosterizeImage(Image *,const unsigned long,const MagickBooleanType),
+  QuantizeImage(const QuantizeInfo *,Image *),
+  QuantizeImages(const QuantizeInfo *,Image *);
+
+extern MagickExport QuantizeInfo
+  *CloneQuantizeInfo(const QuantizeInfo *),
+  *DestroyQuantizeInfo(QuantizeInfo *);
+
+extern MagickExport void
+  CompressImageColormap(Image *),
+  GetQuantizeInfo(QuantizeInfo *);}

+ 37 - 0
lib/ImageMagick/magick/semaphore.inc

@@ -0,0 +1,37 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick methods to lock and unlock semaphores.
+}
+#ifndef _MAGICK_SEMAPHORE_H
+#define _MAGICK_SEMAPHORE_H
+#endif
+
+typedef struct SemaphoreInfo
+  SemaphoreInfo;
+
+extern MagickExport MagickBooleanType
+  LockSemaphoreInfo(SemaphoreInfo *),
+  UnlockSemaphoreInfo(SemaphoreInfo *);
+
+extern MagickExport SemaphoreInfo
+  *AllocateSemaphoreInfo(void),
+  *DestroySemaphoreInfo(SemaphoreInfo *);
+
+extern MagickExport void
+  AcquireSemaphoreInfo(SemaphoreInfo **),
+  DestroySemaphore(void),
+  InitializeSemaphore(void),
+  RelinquishSemaphoreInfo(SemaphoreInfo *);

+ 53 - 0
lib/ImageMagick/magick/statistic.inc

@@ -0,0 +1,53 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image methods.
+}
+
+type
+  ChannelStatistics = record
+    depth: Cardinal;
+
+    minima, maxima: Quantum;
+
+    mean, standard_deviation: double;
+
+    scale: Cardinal;
+  end;
+  
+  PChannelStatistics = ^ChannelStatistics;
+
+{extern MagickExport ChannelStatistics
+  *GetImageChannelStatistics(const Image *,ExceptionInfo *);
+
+extern MagickExport MagickBooleanType
+  GetImageChannelExtrema(const Image *,const ChannelType,unsigned long *,
+    unsigned long *,ExceptionInfo *),
+  GetImageExtrema(const Image *,unsigned long *,unsigned long *,
+    ExceptionInfo *),
+  GetImageChannelMean(const Image *,const ChannelType,double *,double *,
+    ExceptionInfo *),
+  GetImageMean(const Image *,double *,double *,ExceptionInfo *),
+  SetImageChannelDepth(Image *,const ChannelType,const unsigned long),
+  SetImageDepth(Image *,const unsigned long);
+
+extern MagickExport RectangleInfo
+  GetImageBoundingBox(const Image *,ExceptionInfo *exception);
+
+extern MagickExport unsigned long
+  GetImageChannelDepth(const Image *,const ChannelType,ExceptionInfo *),
+  GetImageDepth(const Image *,ExceptionInfo *),
+  GetImageQuantumDepth(const Image *,const MagickBooleanType);}
+

+ 88 - 0
lib/ImageMagick/magick/type.inc

@@ -0,0 +1,88 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick image type methods.
+}
+
+type
+ StretchType = (
+  UndefinedStretch,
+  NormalStretch,
+  UltraCondensedStretch,
+  ExtraCondensedStretch,
+  CondensedStretch,
+  SemiCondensedStretch,
+  SemiExpandedStretch,
+  ExpandedStretch,
+  ExtraExpandedStretch,
+  UltraExpandedStretch,
+  AnyStretch
+ );
+
+type
+ StyleType = (
+  UndefinedStyle,
+  NormalStyle,
+  ItalicStyle,
+  ObliqueStyle,
+  AnyStyle
+ );
+
+type
+  TypeInfo = record
+    face: Cardinal;
+
+    path,
+    name,
+    description,
+    family: PAnsiChar;
+
+    style: StyleType;
+
+    stretch: StretchType;
+
+    weight: Cardinal;
+
+    encoding,
+    foundry,
+    format,
+    metrics,
+    glyphs: PAnsiChar;
+
+    stealth: MagickBooleanType;
+
+    previous, next: Pointer;
+{  struct _TypeInfo
+    *previous,
+    *next;  /* deprecated, use GetTypeInfoList() */}
+
+    signature: Cardinal;
+  end;
+
+{function GetTypeList(const char *,unsigned long *,ExceptionInfo *): PPChar; external MagickExport;
+
+extern MagickExport MagickBooleanType
+  ListTypeInfo(FILE *,ExceptionInfo *);
+
+extern MagickExport const TypeInfo
+  *GetTypeInfo(const char *,ExceptionInfo *),
+  *GetTypeInfoByFamily(const char *,const StyleType,const StretchType,
+    const unsigned long,ExceptionInfo *),
+  **GetTypeInfoList(const char *,unsigned long *,ExceptionInfo *);
+
+MagickExport void
+  DestroyTypeList(void);}
+
+

+ 283 - 0
lib/ImageMagick/wand/drawing_wand.inc

@@ -0,0 +1,283 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick drawing wand API.
+}
+
+{
+  Declaration from drawing-wand.c
+}
+type
+ PathOperation = (
+  PathDefaultOperation,
+  PathCloseOperation,                        // Z|z (none) */
+  PathCurveToOperation,                      // C|c (x1 y1 x2 y2 x y)+ */
+  PathCurveToQuadraticBezierOperation,       // Q|q (x1 y1 x y)+ */
+  PathCurveToQuadraticBezierSmoothOperation, // T|t (x y)+ */
+  PathCurveToSmoothOperation,                // S|s (x2 y2 x y)+ */
+  PathEllipticArcOperation,                  // A|a (rx ry x-axis-rotation large-arc-flag sweep-flag x y)+ */
+  PathLineToHorizontalOperation,             // H|h x+ */
+  PathLineToOperation,                       // L|l (x y)+ */
+  PathLineToVerticalOperation,               // V|v y+ */
+  PathMoveToOperation                        // M|m (x y)+ */
+ );
+
+type
+ PathMode = (
+  DefaultPathMode,
+  AbsolutePathMode,
+  RelativePathMode
+ );
+
+  DrawingWand = record
+    id: Cardinal;
+
+    name: array[0..MaxTextExtent] of AnsiChar;
+
+    { Support structures }
+  
+    image: PImage;
+
+    exception: ExceptionInfo;
+
+    { MVG output string and housekeeping }
+  
+    mvg: PAnsiChar;               // MVG data
+
+    mvg_alloc,                // total allocated memory
+//    mvg_length: size_t;       // total MVG length
+
+    mvg_width: Cardinal;      // current line width 
+
+    { Pattern support }
+    
+    pattern_id: PAnsiChar;
+
+    pattern_bounds: RectangleInfo;
+
+//    pattern_offset: size_t;
+
+    { Graphic wand }
+    
+    index: Cardinal;          // array index
+
+    graphic_context: PPDrawInfo;
+
+    filter_off: MagickBooleanType;    // true if not filtering attributes
+
+    { Pretty-printing depth }
+  
+    indent_depth: Cardinal;       // number of left-hand pad characters 
+
+    { Path operation support }
+  
+    path_operation: PathOperation;
+
+    path_mode: PathMode;
+
+    destroy,
+    debug: MagickBooleanType;
+
+    signature: Cardinal;
+  end;
+ 
+  PDrawingWand = ^DrawingWand;
+
+const x = 9;
+
+function DrawGetTextAlignment(const wand: PDrawingWand): AlignType; cdecl; external WandExport;
+
+function DrawGetClipPath(const wand: PDrawingWand): PAnsiChar; cdecl; external WandExport;
+function DrawGetException(const wand: PDrawingWand; severity: PExceptionType): PAnsiChar; cdecl; external WandExport;
+function DrawGetFont(const wand: PDrawingWand): PAnsiChar; cdecl; external WandExport;
+function DrawGetFontFamily(const wand: PDrawingWand): PAnsiChar; cdecl; external WandExport;
+function DrawGetTextEncoding(const wand: PDrawingWand): PAnsiChar; cdecl; external WandExport;
+function DrawGetVectorGraphics(const wand: PDrawingWand): PAnsiChar; cdecl; external WandExport;
+
+function DrawGetClipUnits(const wand: PDrawingWand): ClipPathUnits; cdecl; external WandExport;
+
+function DrawGetTextDecoration(const wand: PDrawingWand): DecorationType; cdecl; external WandExport;
+
+function DrawGetFillAlpha(const wand: PDrawingWand): double; cdecl; external WandExport;
+function DrawGetFontSize(const wand: PDrawingWand): double; cdecl; external WandExport;
+function DrawGetStrokeDashArray(const wand: PDrawingWand; number_elements: Cardinal): PDouble; cdecl; external WandExport;
+function DrawGetStrokeDashOffset(const wand: PDrawingWand): double; cdecl; external WandExport;
+function DrawGetStrokeAlpha(const wand: PDrawingWand): double; cdecl; external WandExport;
+function DrawGetStrokeWidth(const wand: PDrawingWand): double; cdecl; external WandExport;
+
+function PeekDrawingWand(const wand: PDrawingWand): PDrawInfo; cdecl; external WandExport;
+
+function CloneDrawingWand(const wand: PDrawingWand): PDrawingWand; cdecl; external WandExport;
+function DestroyDrawingWand(wand: PDrawingWand): PDrawingWand; cdecl; external WandExport;
+{ Sem documentação
+function DrawAllocateWand(const DrawInfo *,Image *): PDrawingWand; cdecl; external WandExport;
+}
+function NewDrawingWand: PDrawingWand; cdecl; external WandExport;
+
+function DrawGetClipRule(const wand: PDrawingWand): FillRule; cdecl; external WandExport;
+function DrawGetFillRule(const wand: PDrawingWand): FillRule; cdecl; external WandExport;
+
+function DrawGetGravity(const wand: PDrawingWand): GravityType; cdecl; external WandExport;
+
+function DrawGetStrokeLineCap(const wand: PDrawingWand): LineCap; cdecl; external WandExport;
+
+function DrawGetStrokeLineJoin(const wand: PDrawingWand): LineJoin; cdecl; external WandExport;
+
+function DrawClearException(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function DrawComposite(wand: PDrawingWand; const compose: CompositeOperator;
+ const x, y, width, height: double; magick_wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function DrawGetStrokeAntialias(const wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function DrawGetTextAntialias(const wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function DrawPopPattern(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function DrawPushPattern(wand: PDrawingWand; const pattern_id: PAnsiChar;
+ const x, y, width, height: double): MagickBooleanType; cdecl; external WandExport;
+function DrawRender(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function DrawSetClipPath(wand: PDrawingWand; const clip_path: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function DrawSetFillPatternURL(wand: PDrawingWand; const fill_url: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function DrawSetFont(wand: PDrawingWand; const font_name: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function DrawSetFontFamily(wand: PDrawingWand; const font_family: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function DrawSetStrokeDashArray(wand: PDrawingWand; const number_elements: Cardinal;
+ const dash_array: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function DrawSetStrokePatternURL(wand: PDrawingWand; const stroke_url: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function DrawSetVectorGraphics(wand: PDrawingWand; const xml: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function IsDrawingWand(const wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function PopDrawingWand(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function PushDrawingWand(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+
+function DrawGetFontStretch(const wand: PDrawingWand): StretchType; cdecl; external WandExport;
+
+function DrawGetFontStyle(const wand: PDrawingWand): StyleType; cdecl; external WandExport;
+
+function DrawGetFontWeight(const wand: PDrawingWand): Cardinal; cdecl; external WandExport;
+function DrawGetStrokeMiterLimit(const wand: PDrawingWand): Cardinal; cdecl; external WandExport;
+
+procedure ClearDrawingWand(wand: PDrawingWand); cdecl; external WandExport;
+procedure DrawAffine(wand: PDrawingWand; const affine: PAffineMatrix); cdecl; external WandExport;
+procedure DrawAnnotation(wand: PDrawingWand; const  x, y: double;
+ const text: PAnsiChar); cdecl; external WandExport;
+procedure DrawArc(wand: PDrawingWand; const sx, sy, ex, ey, sd, ed: double); cdecl; external WandExport;
+procedure DrawBezier(wand: PDrawingWand; const number_coordinates: Cardinal;
+ const coordinates: PPointInfo); cdecl; external WandExport;
+procedure DrawCircle(wand: PDrawingWand; const ox, oy, px, py: double); cdecl; external WandExport;
+procedure DrawColor(wand: PDrawingWand; const x, y: double;
+ const paint_method: PaintMethod); cdecl; external WandExport;
+procedure DrawComment(wand: PDrawingWand; const comment: PAnsiChar); cdecl; external WandExport;
+procedure DrawEllipse(wand: PDrawingWand; const ox, oy, rx, ry, start, end_: double); cdecl; external WandExport;
+procedure DrawGetFillColor(const wand: PDrawingWand; fill_color: PPixelWand); cdecl; external WandExport;
+procedure DrawGetStrokeColor(const wand: PDrawingWand; stroke_color: PPixelWand); cdecl; external WandExport;
+procedure DrawGetTextUnderColor(const wand: PDrawingWand; under_color: PPixelWand); cdecl; external WandExport;
+procedure DrawLine(wand: PDrawingWand; const sx, sy, ex, ey: double); cdecl; external WandExport;
+procedure DrawMatte(wand: PDrawingWand; const x, y: double;
+ const paint_method: PaintMethod); cdecl; external WandExport;
+procedure DrawPathClose(wand: PDrawingWand); cdecl; external WandExport;
+procedure DrawPathCurveToAbsolute(wand: PDrawingWand;
+ const x1, y1, x2, y2, x, y: double); cdecl; external WandExport;
+procedure DrawPathCurveToRelative(wand: PDrawingWand;
+ const x1, y1, x2, y2, x, y: double); cdecl; external WandExport;
+procedure DrawPathCurveToQuadraticBezierAbsolute(wand: PDrawingWand;
+ const x1, y1, x, y: double); cdecl; external WandExport;
+procedure DrawPathCurveToQuadraticBezierRelative(wand: PDrawingWand;
+ const x1, y1, x, y: double); cdecl; external WandExport;
+procedure DrawPathCurveToQuadraticBezierSmoothAbsolute(wand: PDrawingWand;
+ const x, y: double); cdecl; external WandExport;
+procedure DrawPathCurveToQuadraticBezierSmoothRelative(wand: PDrawingWand;
+ const x, y: double); cdecl; external WandExport;
+procedure DrawPathCurveToSmoothAbsolute(wand: PDrawingWand;
+ const x2, y2, x, y: double); cdecl; external WandExport;
+procedure DrawPathCurveToSmoothRelative(wand: PDrawingWand;
+ const x2, y2, x, y: double); cdecl; external WandExport;
+procedure DrawPathEllipticArcAbsolute(wand: PDrawingWand;
+    const rx, ry, x_axis_rotation: double;
+    const large_arc_flag: MagickBooleanType;
+    const sweep_flag: MagickBooleanType; const x, y: double); cdecl; external WandExport;
+procedure DrawPathEllipticArcRelative(wand: PDrawingWand;
+    const rx, ry, x_axis_rotation: double;
+    const large_arc_flag: MagickBooleanType;
+    const sweep_flag: MagickBooleanType; const x, y: double); cdecl; external WandExport;
+procedure DrawPathFinish(wand: PDrawingWand); cdecl; external WandExport;
+procedure DrawPathLineToAbsolute(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
+procedure DrawPathLineToRelative(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
+{procedure DrawPathLineToHorizontalAbsolute(wand: PDrawingWand;
+ const mode: PathMode; const x: double); cdecl; external WandExport;
+procedure DrawPathLineToHorizontalRelative(wand: PDrawingWand); cdecl; external WandExport;
+
+Contradição na declaração
+}
+procedure DrawPathLineToVerticalAbsolute(wand: PDrawingWand; const y: double); cdecl; external WandExport;
+procedure DrawPathLineToVerticalRelative(wand: PDrawingWand; const y: double); cdecl; external WandExport;
+procedure DrawPathMoveToAbsolute(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
+procedure DrawPathMoveToRelative(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
+procedure DrawPathStart(wand: PDrawingWand); cdecl; external WandExport;
+procedure DrawPoint(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
+procedure DrawPolygon(wand: PDrawingWand; const number_coordinates: Cardinal; const coordinates: PPointInfo
+ ); cdecl; external WandExport;
+procedure DrawPolyline(wand: PDrawingWand; const number_coordinates: Cardinal; const coordinates: PPointInfo
+ ); cdecl; external WandExport;
+procedure DrawPopClipPath(wand: PDrawingWand); cdecl; external WandExport;
+procedure DrawPopDefs(wand: PDrawingWand); cdecl; external WandExport;
+procedure DrawPushClipPath(wand: PDrawingWand; clip_path_id: PAnsiChar); cdecl; external WandExport;
+procedure DrawPushDefs(wand: PDrawingWand); cdecl; external WandExport;
+procedure DrawRectangle(wand: PDrawingWand; const x1, y1, x2, y2: double); cdecl; external WandExport;
+procedure DrawRotate(wand: PDrawingWand; const degrees: double); cdecl; external WandExport;
+procedure DrawRoundRectangle(wand: PDrawingWand; const x1, y1, x2, y2, rx, ry: double); cdecl; external WandExport;
+procedure DrawScale(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
+procedure DrawSetClipRule(wand: PDrawingWand; const fill_rule: FillRule); cdecl; external WandExport;
+procedure DrawSetClipUnits(wand: PDrawingWand; const clip_units: ClipPathUnits); cdecl; external WandExport;
+procedure DrawSetFillColor(wand: PDrawingWand; const fill_wand: PPixelWand); cdecl; external WandExport;
+procedure DrawSetFillAlpha(wand: PDrawingWand; const fill_opacity: double); cdecl; external WandExport;
+procedure DrawSetFillRule(wand: PDrawingWand; const fill_rule: FillRule); cdecl; external WandExport;
+procedure DrawSetFontSize(wand: PDrawingWand; const pointsize: double); cdecl; external WandExport;
+procedure DrawSetFontStretch(wand: PDrawingWand; const font_stretch: StretchType); cdecl; external WandExport;
+procedure DrawSetFontStyle(wand: PDrawingWand; const style: StyleType); cdecl; external WandExport;
+procedure DrawSetFontWeight(wand: PDrawingWand; const font_weight: Cardinal); cdecl; external WandExport;
+procedure DrawSetGravity(wand: PDrawingWand; const gravity: GravityType); cdecl; external WandExport;
+procedure DrawSkewX(wand: PDrawingWand; const degrees: double); cdecl; external WandExport;
+procedure DrawSkewY(wand: PDrawingWand; const degrees: double); cdecl; external WandExport;
+procedure DrawSetStrokeAntialias(wand: PDrawingWand; const stroke_antialias: MagickBooleanType
+ ); cdecl; external WandExport;
+procedure DrawSetStrokeColor(wand: PDrawingWand; const stroke_wand: PPixelWand); cdecl; external WandExport;
+procedure DrawSetStrokeDashOffset(wand: PDrawingWand; const dash_offset: double); cdecl; external WandExport;
+procedure DrawSetStrokeLineCap(wand: PDrawingWand; const linecap_: LineCap); cdecl; external WandExport;
+procedure DrawSetStrokeLineJoin(wand: PDrawingWand; const linejoin_: LineJoin); cdecl; external WandExport;
+procedure DrawSetStrokeMiterLimit(wand: PDrawingWand; const miterlimit: Cardinal); cdecl; external WandExport;
+procedure DrawSetStrokeAlpha(wand: PDrawingWand; const stroke_opacity: double); cdecl; external WandExport;
+procedure DrawSetStrokeWidth(wand: PDrawingWand; const troke_width: double); cdecl; external WandExport;
+procedure DrawSetTextAlignment(wand: PDrawingWand; const alignment: AlignType); cdecl; external WandExport;
+procedure DrawSetTextAntialias(wand: PDrawingWand; const text_antialias: MagickBooleanType
+ ); cdecl; external WandExport;
+procedure DrawSetTextDecoration(wand: PDrawingWand; const decoration: DecorationType); cdecl; external WandExport;
+procedure DrawSetTextEncoding(wand: PDrawingWand; const encoding: PAnsiChar); cdecl; external WandExport;
+procedure DrawSetTextUnderColor(wand: PDrawingWand; const under_wand: PPixelWand); cdecl; external WandExport;
+procedure DrawSetViewbox(wand: PDrawingWand; x1, y1, x2, y2: Cardinal); cdecl; external WandExport;
+procedure DrawTranslate(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
+
+{
+  Deprecated.
+}
+{typedef struct _DrawingWand
+  *DrawContext;
+
+extern WandExport double
+  DrawGetFillOpacity(const wand: PDrawingWand),
+  DrawGetStrokeOpacity(const wand: PDrawingWand);
+
+extern WandExport DrawInfo
+  *DrawPeekGraphicWand(const wand: PDrawingWand);
+
+extern WandExport void
+  DrawPopGraphicContext(DrawingWand *),
+  DrawPushGraphicContext(DrawingWand *),
+  DrawSetFillOpacity(DrawingWand *,const double),
+  DrawSetStrokeOpacity(DrawingWand *,const double);}

+ 80 - 0
lib/ImageMagick/wand/magick_attribute.inc

@@ -0,0 +1,80 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  Set or Get Magick Wand Attributes.
+}
+
+function MagickGetException(wand: PMagickWand;
+ severity: PExceptionType): PAnsiChar; cdecl; external WandExport;
+function MagickGetFilename(const wand: PMagickWand): PAnsiChar; cdecl; external WandExport;
+function MagickGetFormat(wand: PMagickWand): PAnsiChar; cdecl; external WandExport;
+function MagickGetHomeURL: PAnsiChar; cdecl; external WandExport;
+function MagickGetOption(wand: PMagickWand;
+ const key: PAnsiChar): PAnsiChar; cdecl; external WandExport;
+{sem documentação
+extern WandExport char
+  *MagickQueryConfigureOption(const char *),
+  **MagickQueryConfigureOptions(const char *,unsigned long *),
+  **MagickQueryFonts(const char *,unsigned long *),
+  **MagickQueryFormats(const char *,unsigned long *);}
+
+function MagickGetCompression(wand: PMagickWand): CompressionType; cdecl; external WandExport;
+
+function MagickGetCopyright: PAnsiChar; cdecl; external WandExport;
+function MagickGetPackageName: PAnsiChar; cdecl; external WandExport;
+function MagickGetQuantumDepth(depth: PCardinal): PAnsiChar; cdecl; external WandExport;
+function MagickGetQuantumRange(range: PCardinal): PAnsiChar; cdecl; external WandExport;
+function MagickGetReleaseDate: PAnsiChar; cdecl; external WandExport;
+function MagickGetVersion(version: PCardinal): PAnsiChar; cdecl; external WandExport;
+
+function MagickGetSamplingFactors(wand: PMagickWand;
+ number_factors: PCardinal): Pdouble; cdecl; external WandExport;
+{function (wand: PMagickWand): Pdouble; cdecl; external WandExport;
+  *MagickQueryFontMetrics(MagickWand *,const DrawingWand *,const char *),
+  *MagickQueryMultilineFontMetrics(MagickWand *,const DrawingWand *,
+    const char *);}
+
+function MagickGetInterlaceScheme(wand: PMagickWand): InterlaceType; cdecl; external WandExport;
+
+{function (const wand: PMagickWand): ; cdecl; external WandExport;
+extern WandExport MagickBooleanType
+  MagickGetPage(MagickWand *,unsigned long *,unsigned long *,long *,long *),
+  MagickGetSize(const MagickWand *,unsigned long *,unsigned long *),
+  MagickSetBackgroundColor(MagickWand *,const PixelWand *),
+  MagickSetCompression(MagickWand *,const CompressionType),
+  MagickSetCompressionQuality(MagickWand *,const unsigned long),
+  MagickSetFilename(MagickWand *,const char *),
+  MagickSetFormat(MagickWand *,const char *),
+  MagickSetInterlaceScheme(MagickWand *,const InterlaceType),
+  MagickSetOption(MagickWand *,const char *,const char *),
+  MagickSetPage(MagickWand *,const unsigned long,const unsigned long,
+    const long,const long),
+  MagickSetPassphrase(MagickWand *,const char *),
+  MagickSetResolution(MagickWand *,const double,const double),
+  MagickSetResourceLimit(const ResourceType type,const unsigned long limit),
+  MagickSetSamplingFactors(MagickWand *,const unsigned long,const double *),
+  MagickSetSize(MagickWand *,const unsigned long,const unsigned long),
+  MagickSetType(MagickWand *,const ImageType);
+
+function (const wand: PMagickWand): ; cdecl; external WandExport;
+extern WandExport MagickProgressMonitor
+  MagickSetProgressMonitor(MagickWand *,const MagickProgressMonitor,void *);
+
+function (const wand: PMagickWand): ; cdecl; external WandExport;
+extern WandExport unsigned long
+  MagickGetCompressionQuality(MagickWand *),
+  MagickGetResource(const ResourceType),
+  MagickGetResourceLimit(const ResourceType);}
+

+ 426 - 0
lib/ImageMagick/wand/magick_image.inc

@@ -0,0 +1,426 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  Magick Wand Image Methods.
+}
+
+{ BugFix :
+  - MagickDrawImage(...const drawing_wand: PMagickWand...
+  + MagickDrawImage(...const drawing_wand: PDrawingWand...
+  - MagickAffineTransformImage(...const drawing_wand: PMagickWand...
+  + MagickAffineTransformImage(...const drawing_wand: PDrawingWand...
+  - MagickAnnotateImage(...const drawing_wand: PMagickWand...
+  + MagickAnnotateImage(...const drawing_wand: PDrawingWand...
+}
+
+function MagickGetImageChannelStatistics(wand: PMagickWand): PChannelStatistics; cdecl; external WandExport;
+
+function MagickGetImageAttribute(wand: PMagickWand): PAnsiChar; cdecl; external WandExport;
+function MagickGetImageFilename(wand: PMagickWand): PAnsiChar; cdecl; external WandExport;
+function MagickGetImageFormat(wand: PMagickWand): PAnsiChar; cdecl; external WandExport;
+function MagickGetImageSignature(wand: PMagickWand): PAnsiChar; cdecl; external WandExport;
+function MagickIdentifyImage(wand: PMagickWand): PAnsiChar; cdecl; external WandExport;
+
+function MagickGetImageCompose(wand: PMagickWand): CompositeOperator; cdecl; external WandExport;
+
+function MagickGetImageColorspace(wand: PMagickWand): ColorspaceType; cdecl; external WandExport;
+
+function MagickGetImageCompression(wand: PMagickWand): CompressionType; cdecl; external WandExport;
+
+function MagickGetImageDispose(wand: PMagickWand): DisposeType; cdecl; external WandExport;
+
+function MagickGetImageGamma(wand: PMagickWand): double; cdecl; external WandExport;
+function MagickGetImageTotalInkDensity(wand: PMagickWand): double; cdecl; external WandExport;
+
+function GetImageFromMagickWand(wand: PMagickWand): PImage; cdecl; external WandExport;
+
+function MagickGetImageType(wand: PMagickWand): ImageType; cdecl; external WandExport;
+
+function MagickGetImageInterlaceScheme(wand: PMagickWand): InterlaceType; cdecl; external WandExport;
+
+function MagickGetImageIndex(wand: PMagickWand): Integer; cdecl; external WandExport;
+
+function MagickAdaptiveThresholdImage(wand: PMagickWand;
+     const width, height: Cardinal; const offset: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickAddImage(wand: PMagickWand; const add_wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickAddNoiseImage(wand: PMagickWand; const noise_type: NoiseType): MagickBooleanType; cdecl; external WandExport;
+function MagickAffineTransformImage(wand: PMagickWand;
+ const drawing_wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function MagickAnnotateImage(wand: PMagickWand;
+ const drawing_wand: PDrawingWand; const x, y, angle: double;
+ const text: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickAnimateImages(wand: PMagickWand;
+ const server_name: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickBlackThresholdImage(wand: PMagickWand;
+ const threshold: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickBlurImage(wand: PMagickWand;
+ const radius, sigma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickBlurImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const radius, sigma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickBorderImage(wand: PMagickWand;
+ const bordercolor: PPixelWand; const width, height: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickCharcoalImage(wand: PMagickWand;
+   const radius, sigma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickChopImage(wand: PMagickWand;
+ const width, height: Cardinal; const x, y: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickClipImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickClipPathImage(wand: PMagickWand;
+ const pathname: PAnsiChar; const inside: MagickBooleanType): MagickBooleanType; cdecl; external WandExport;
+function MagickColorFloodfillImage(wand: PMagickWand;
+ const fill: PPixelWand; const fuzz: double; const bordercolor: PPixelWand;
+ const x, y: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickColorizeImage(wand: PMagickWand;
+ const colorize, opacity: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickCommentImage(wand: PMagickWand;
+ const comment: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickCompositeImage(wand: PMagickWand;
+ const composite_wand: PMagickWand; const compose: CompositeOperator;
+ const x, y: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickConstituteImage(wand: PMagickWand;
+ const columns, rows: Cardinal; const map: PAnsiChar;
+ const storage: StorageType; pixels: Pointer): MagickBooleanType; cdecl; external WandExport;
+function MagickContrastImage(wand: PMagickWand;
+ const sharpen: MagickBooleanType): MagickBooleanType; cdecl; external WandExport;
+function MagickConvolveImage(wand: PMagickWand;
+ const order: Cardinal; const kernel: PDouble): MagickBooleanType; cdecl; external WandExport;
+function MagickConvolveImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const order: Cardinal;
+ const kernel: PDouble): MagickBooleanType; cdecl; external WandExport;
+function MagickCropImage(wand: PMagickWand;
+ const width, height: Cardinal; const x, y: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickCycleColormapImage(wand: PMagickWand;
+ const displace: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickDespeckleImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickDisplayImage(wand: PMagickWand;
+ const server_name: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickDisplayImages(wand: PMagickWand;
+ const server_name: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickDrawImage(wand: PMagickWand;
+ const drawing_wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
+function MagickEdgeImage(wand: PMagickWand;
+ const radius: double): MagickBooleanType; cdecl; external WandExport;
+function MagickEmbossImage(wand: PMagickWand;
+ const radius, sigma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickEnhanceImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickEqualizeImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickEvaluateImage(wand: PMagickWand;
+ const op: MagickEvaluateOperator; const constant: double): MagickBooleanType; cdecl; external WandExport;
+function MagickEvaluateImageChannel(wand: PMagickWand;
+ const op: MagickEvaluateOperator; const constant: double): MagickBooleanType; cdecl; external WandExport;
+function MagickFlipImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickFlopImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickFrameImage(wand: PMagickWand;
+ const matte_color: PPixelWand; const width, height: Cardinal;
+ const inner_bevel, outer_bevel: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickGammaImage(wand: PMagickWand; const gamma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickGammaImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const gamma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickGaussianBlurImage(wand: PMagickWand;
+ const radius, sigma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickGaussianBlurImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const radius, sigma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageBackgroundColor(wand: PMagickWand;
+ background_color: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageBluePrimary(wand: PMagickWand; x, y: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageBorderColor(wand: PMagickWand; border_color: PPixelWand
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageChannelDistortion(wand: PMagickWand;
+ const reference: PMagickWand; const channel: ChannelType;
+ const metric: MetricType; distortion: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageDistortion(wand: PMagickWand;
+ const reference: PMagickWand; const metric: MetricType;
+ distortion: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageChannelExtrema(wand: PMagickWand;
+ const channel: ChannelType; minima, maxima: PCardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageChannelMean(wand: PMagickWand;
+ const channel: ChannelType; mean, standard_deviation: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageColormapColor(wand: PMagickWand;
+ const index: Cardinal; color: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageExtrema(wand: PMagickWand;
+ min, max: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageGreenPrimary(wand: PMagickWand; x, y: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageMatteColor(wand: PMagickWand;
+ matte_color: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImagePage(wand: PMagickWand;
+ width, height: PCardinal; x, y: PInteger): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImagePixelColor(wand: PMagickWand;
+ const x, y: Integer; color: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImagePixels(wand: PMagickWand;
+ const x, y: Integer; const columns, rows: Cardinal;
+ const map: PAnsiChar; const storage: StorageType; pixels: Pointer): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageRedPrimary(wand: PMagickWand; x, y: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageResolution(wand: PMagickWand; x, y: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickGetImageWhitePoint(wand: PMagickWand; x, y: Pdouble): MagickBooleanType; cdecl; external WandExport;
+function MagickHasNextImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickHasPreviousImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickImplodeImage(wand: PMagickWand; const radius: double): MagickBooleanType; cdecl; external WandExport;
+function MagickLabelImage(wand: PMagickWand; const _label: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickLevelImage(wand: PMagickWand;
+ const black_point, gamma, white_point: double): MagickBooleanType; cdecl; external WandExport;
+function MagickLevelImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const black_point, gamma, white_point: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickMagnifyImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickMapImage(wand: PMagickWand;
+ const map_wand: PMagickWand; const dither: MagickBooleanType): MagickBooleanType; cdecl; external WandExport;
+function MagickMatteFloodfillImage(wand: PMagickWand;
+ const opacity: Quantum; const fuzz: double; const bordercolor: PPixelWand;
+ const x, y: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickMedianFilterImage(wand: PMagickWand; const radius: double): MagickBooleanType; cdecl; external WandExport;
+function MagickMinifyImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickModulateImage(wand: PMagickWand;
+ const brightness, saturation, hue: double): MagickBooleanType; cdecl; external WandExport;
+function MagickMotionBlurImage(wand: PMagickWand;
+ const radius, sigma, angle: double): MagickBooleanType; cdecl; external WandExport;
+function MagickNegateImage(wand: PMagickWand; const gray: MagickBooleanType): MagickBooleanType; cdecl; external WandExport;
+{
+function MagickNegateImageChannel(wand: PMagickWand): MagickBooleanType; external WandExport;
+  (MagickWand *,const ChannelType,
+    const MagickBooleanType),
+  Documentation not found
+}
+function MagickNewImage(wand: PMagickWand;
+ const columns, rows: Cardinal; const background: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickNextImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickNormalizeImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickOilPaintImage(wand: PMagickWand; const radius: double): MagickBooleanType; cdecl; external WandExport;
+function MagickPaintOpaqueImage(wand: PMagickWand;
+ const target, fill: PPixelWand; const fuzz: double): MagickBooleanType; cdecl; external WandExport;
+function MagickPaintTransparentImage(wand: PMagickWand;
+ const target: PPixelWand; const opacity: Quantum; const fuzz: double): MagickBooleanType; cdecl; external WandExport;
+function MagickPingImage(wand: PMagickWand;
+ const filename: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+{
+function MagickPosterizeImage(wand: PMagickWand;
+ const levels: Word; const dither: MagickBooleanType): MagickBooleanType; cdecl; external WandExport;
+??
+}
+function MagickPreviousImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickProfileImage(wand: PMagickWand; const name: PAnsiChar;
+ const profile: PAnsiChar; const length: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickQuantizeImage(wand: PMagickWand;
+ const number_colors: Cardinal; const colorspace: ColorspaceType;
+ const treedepth: Cardinal; const dither, measure_error): MagickBooleanType; cdecl; external WandExport;
+function MagickQuantizeImages(wand: PMagickWand;
+ const number_colors: Cardinal; const colorspace: ColorspaceType;
+ const treedepth: Cardinal; const dither: MagickBooleanType;
+ const measure_error: MagickBooleanType): MagickBooleanType; cdecl; external WandExport;
+function MagickRadialBlurImage(wand: PMagickWand; const angle: double): MagickBooleanType; cdecl; external WandExport;
+function MagickRadialBlurImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const angle: double): MagickBooleanType; cdecl; external WandExport;
+function MagickRaiseImage(wand: PMagickWand;
+ const width, height: Cardinal; const x, y: Integer;
+ const raise_: MagickBooleanType): MagickBooleanType; cdecl; external WandExport;
+function MagickReadImage(wand: PMagickWand; const filename: PAnsiChar
+): MagickBooleanType; cdecl; external WandExport;
+function MagickReadImageBlob(wand: PMagickWand;
+ const blob: Pointer; const length: Integer): MagickBooleanType; cdecl; external WandExport;
+//function MagickReadImageFile(wand: PMagickWand; file_: file): MagickBooleanType; external WandExport;
+
+function MagickReduceNoiseImage(wand: PMagickWand; const radius: double): MagickBooleanType; cdecl; external WandExport;
+function MagickRemoveImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickResampleImage(wand: PMagickWand;
+ const x_resolution, y_resolution: double;
+ const filter: FilterTypes; const blur: double): MagickBooleanType; cdecl; external WandExport;
+function MagickResizeImage(wand: PMagickWand;
+ const columns, rows: Cardinal; const filter: FilterTypes;
+ const blur: double): MagickBooleanType; cdecl; external WandExport;
+function MagickRollImage(wand: PMagickWand;
+ const x: Integer; const y: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickRotateImage(wand: PMagickWand; const background: PPixelWand;
+ const degrees: double): MagickBooleanType; cdecl; external WandExport;
+function MagickSampleImage(wand: PMagickWand; const columns, rows: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickScaleImage(wand: PMagickWand; const columns, rows: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSeparateImageChannel(wand: PMagickWand; const channel: ChannelType): MagickBooleanType; cdecl; external WandExport;
+
+// MagickSepiaToneImage(MagickWand *,const double),
+
+function MagickSetImage(wand: PMagickWand; const set_wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageAttribute(wand: PMagickWand; const key, attribute: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageBackgroundColor(wand: PMagickWand; const background: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageBias(wand: PMagickWand; const bias: double): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageBluePrimary(wand: PMagickWand; const x, y: double): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageBorderColor(wand: PMagickWand; const border: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageChannelDepth(wand: PMagickWand; const channel: ChannelType; const depth: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageColormapColor(wand: PMagickWand; const index: Cardinal; const color: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageColorspace(wand: PMagickWand; const colorspace: ColorspaceType): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageCompose(wand: PMagickWand; const compose: CompositeOperator): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageCompression(wand: PMagickWand; const compression: CompressionType): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageCompressionQuality(wand: PMagickWand; const quality: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageDelay(wand: PMagickWand; const delay: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageDepth(wand: PMagickWand; const depth: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageDispose(wand: PMagickWand; const dispose: DisposeType): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageExtent(wand: PMagickWand; const columns, rows: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageFilename(wand: PMagickWand; const filename: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageFormat(wand: PMagickWand; const format: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageGamma(wand: PMagickWand; const gamma: Double): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageGreenPrimary(wand: PMagickWand; const x, y: Double): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageIndex(wand: PMagickWand; const index: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageInterlaceScheme(wand: PMagickWand; const interlace_scheme: InterlaceType): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageIterations(wand: PMagickWand; const iterations: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageMatteColor(wand: PMagickWand; const matte: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImagePage(wand: PMagickWand; const width, height: Cardinal; const x, y: Integer): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImagePixels(wand: PMagickWand; const x, y: Integer; const columns, rows: Cardinal;
+ const map: PAnsiChar; const storage: StorageType; const pixels: Pointer): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageProfile(wand: PMagickWand; const name: PAnsiChar; const profile: Pointer;
+ const length: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageRedPrimary(wand: PMagickWand; const x, y: Double): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageRenderingIntent(wand: PMagickWand; const rendering_intent: RenderingIntent
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageResolution(wand: PMagickWand; const x_resolution, y_resolution: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageScene(wand: PMagickWand; const scene: Cardinal): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageType(wand: PMagickWand; const image_type: ImageType
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageUnits(wand: PMagickWand; const units: ResolutionType
+ ): MagickBooleanType; cdecl; external WandExport;
+//function MagickSetImageVirtualPixelMethod(wand: PMagickWand;
+// const method: VirtualPixelMethod): MagickBooleanType; cdecl; external WandExport;
+function MagickSetImageWhitePoint(wand: PMagickWand; const x, y: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickShadowImage(wand: PMagickWand; const radius, sigma: double; const x, y: Integer
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSharpenImage(wand: PMagickWand; const radius, sigma: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSharpenImageChannel(wand: PMagickWand; const channel: ChannelType;
+ const radius, sigma: double): MagickBooleanType; cdecl; external WandExport;
+function MagickShaveImage(wand: PMagickWand; const columns, rows: Cardinal
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickShearImage(wand: PMagickWand; const background: PPixelWand;
+ const x_shear, y_shear: double): MagickBooleanType; cdecl; external WandExport;
+function MagickSigmoidalContrastImage(wand: PMagickWand;
+ const sharpen: MagickBooleanType; const alpha, beta: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSigmoidalContrastImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const sharpen: MagickBooleanType; const alpha, beta: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSolarizeImage(wand: PMagickWand; const threshold: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSpliceImage(wand: PMagickWand; const width, height: Cardinal; const x, y: Integer
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickSpreadImage(wand: PMagickWand; const radius: double): MagickBooleanType; cdecl; external WandExport;
+function MagickStripImage(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickSwirlImage(wand: PMagickWand; const degrees: double): MagickBooleanType; cdecl; external WandExport;
+function MagickTintImage(wand: PMagickWand; const tint: PPixelWand; const opacity: PPixelWand
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickThresholdImage(wand: PMagickWand; const threshold: double): MagickBooleanType; cdecl; external WandExport;
+function MagickThresholdImageChannel(wand: PMagickWand; const channel: ChannelType;
+ const threshold: double): MagickBooleanType; cdecl; external WandExport;
+function MagickTrimImage(wand: PMagickWand; const fuzz: double): MagickBooleanType; cdecl; external WandExport;
+function MagickUnsharpMaskImage(wand: PMagickWand;
+ const radius, sigma, amount, threshold: double): MagickBooleanType; cdecl; external WandExport;
+function MagickUnsharpMaskImageChannel(wand: PMagickWand;
+ const channel: ChannelType; const radius, sigma, amount, threshold: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickWaveImage(wand: PMagickWand; const amplitude, wave_length: double
+ ): MagickBooleanType; cdecl; external WandExport;
+function MagickWhiteThresholdImage(wand: PMagickWand; const threshold: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function MagickWriteImage(wand: PMagickWand;
+ const filename: PAnsiChar): MagickBooleanType; cdecl; external WandExport;
+//  MagickWriteImageFile(MagickWand *,FILE *),
+function MagickWriteImages(wand: PMagickWand;
+ const filename: PAnsiChar; const adjoin: MagickBooleanType
+ ): MagickBooleanType; cdecl; external WandExport;
+//  MagickWriteImagesFile(MagickWand *,FILE *);
+
+
+function MagickSetImageProgressMonitor(wand: PMagickWand;
+ const progress_monitor: MagickProgressMonitor; client_data: Pointer): MagickProgressMonitor; cdecl; external WandExport;
+
+function MagickGetImageSize(wand: PMagickWand): MagickSizeType; cdecl; external WandExport;
+
+function MagickAppendImages(wand: PMagickWand; const stack: MagickBooleanType): PMagickWand; cdecl; external WandExport;
+function MagickAverageImages(wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function MagickCoalesceImages(wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function MagickCombineImages(wand: PMagickWand; para2: ChannelType): PMagickWand; cdecl; external WandExport;
+function MagickCompareImageChannels(wand: PMagickWand;
+ const reference: PMagickWand; const channel: ChannelType; const metric: MetricType; distortion: PDouble
+ ): PMagickWand; cdecl; external WandExport;
+function MagickCompareImages(wand: PMagickWand;
+ const reference: PMagickWand; const metric: MetricType; distortion: PDouble
+ ): PMagickWand; cdecl; external WandExport;
+function MagickDeconstructImages(wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function MagickFlattenImages(wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function MagickFxImage(wand: PMagickWand; const expression: PAnsiChar): PMagickWand; cdecl; external WandExport;
+function MagickFxImageChannel(wand: PMagickWand; const channel: ChannelType; const expression: PAnsiChar
+ ): PMagickWand; cdecl; external WandExport;
+function MagickGetImage(wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function MagickGetImageRegion(wand: PMagickWand;
+ const width, height: Cardinal; const x, y: Integer
+ ): PMagickWand; cdecl; external WandExport;
+function MagickMorphImages(wand: PMagickWand; const number_frames: Cardinal): PMagickWand; cdecl; external WandExport;
+function MagickMosaicImages(wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+//function MagickMontageImage(wand: PMagickWand;
+// const drawing_wand: DrawingWand; const tile_geometry: PAnsiChar;
+// const thumbnail_geometry: PAnsiChar; const mode: MontageMode; const frame: PAnsiChar
+// ): PMagickWand; cdecl; external WandExport;
+function MagickPreviewImages(wand: PMagickWand; const preview: PreviewType): PMagickWand; cdecl; external WandExport;
+function MagickSteganoImage(wand: PMagickWand; const watermark_wand: PMagickWand;
+ const offset: Integer): PMagickWand; cdecl; external WandExport;
+function MagickStereoImage(wand: PMagickWand; const offset_wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function MagickTextureImage(wand: PMagickWand; const texture_wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function MagickTransformImage(wand: PMagickWand; const crop, geometry: PAnsiChar): PMagickWand; cdecl; external WandExport;
+function NewMagickWandFromImage(para1: PImage): PMagickWand; cdecl; external WandExport;
+
+function MagickGetImageHistogram(wand: PMagickWand; number_colors: PCardinal): PPPixelWand; cdecl; external  WandExport;
+
+function MagickGetImageRenderingIntent(wand: PMagickWand): RenderingIntent; cdecl; external WandExport;
+
+function MagickGetImageUnits(wand: PMagickWand): ResolutionType; cdecl; external WandExport;
+
+{function MagickGetImageBlob(wand: PMagickWand; length: Psize_t): PByte; cdecl; external WandExport;
+function (wand: PMagickWand): PByte; cdecl; external WandExport;
+function (wand: PMagickWand): PByte; cdecl; external WandExport;
+function (wand: PMagickWand): PByte; cdecl; external WandExport;
+
+extern WandExport unsigned char
+  *MagickGetImageBlob(MagickWand *,size_t *),
+  *MagickGetImagesBlob(MagickWand *,size_t *),
+  *MagickGetImageProfile(MagickWand *,const char *,unsigned long *),
+  *MagickRemoveImageProfile(MagickWand *,const char *,unsigned long *);}
+
+function MagickGetImageColors(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetImageCompressionQuality(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetImageDelay(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetImageChannelDepth(wand: PMagickWand; const channel: ChannelType): Cardinal; cdecl; external WandExport;
+function MagickGetImageDepth(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetImageHeight(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetImageIterations(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetImageScene(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetImageWidth(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+function MagickGetNumberImages(wand: PMagickWand): Cardinal; cdecl; external WandExport;
+
+//function MagickGetImageVirtualPixelMethod(wand: PMagickWand): VirtualPixelMethod; cdecl; external WandExport;
+
+{
+  Deprecated methods.
+}
+{extern WandExport char
+  *MagickDescribeImage(MagickWand *);
+
+extern WandExport MagickBooleanType
+  MagickOpaqueImage(MagickWand *,const PixelWand *,const PixelWand *,
+    const double),
+  MagickSetImageOption(MagickWand *,const char *,const char *,const char *),
+  MagickTransparentImage(MagickWand *,const PixelWand *,const Quantum,
+    const double);
+
+extern WandExport MagickWand
+  *MagickRegionOfInterestImage(MagickWand *,const unsigned long,
+	  const unsigned long,const long,const long);
+
+extern WandExport unsigned char
+  *MagickWriteImageBlob(MagickWand *,size_t *);
+}

BIN
lib/ImageMagick/wand/magick_wand.dcu


+ 74 - 0
lib/ImageMagick/wand/magick_wand.pas

@@ -0,0 +1,74 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick MagickWand API.
+  
+  Converted from c by: Felipe Monteiro de Carvalho Dez/2005
+
+	Bug-fixed by Ángel Eduardo García Hernández
+	Thanks to Marc Geldon and RuBBeR
+}
+{Version 0.4}
+unit magick_wand;
+
+{$IFDEF FPC}
+  {$mode objfpc}
+	{$PACKRECORDS C}
+{$ENDIF}
+
+{$MINENUMSIZE 1}
+
+interface
+
+uses ImageMagick;
+
+type
+  MagickWand = record
+    id: Cardinal;
+    name: array[1..MaxTextExtent] of ansiChar;
+    exception: ExceptionInfo;
+    image_info: PImageInfo;
+    quantize_info: PQuantizeInfo;
+    images: PImage;
+    active, pend, debug: MagickBooleanType;
+    signature: Cardinal;
+  end;
+
+  PMagickWand = ^MagickWand;
+
+{$include pixel_wand.inc}
+{$include drawing_wand.inc}
+{$include magick_attribute.inc}
+{$include magick_image.inc}
+{$include pixel_iterator.inc}
+
+function IsMagickWand(const wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+function MagickClearException(wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
+
+function CloneMagickWand(const wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function DestroyMagickWand(wand: PMagickWand): PMagickWand; cdecl; external WandExport;
+function NewMagickWand: PMagickWand; cdecl; external WandExport;
+
+procedure ClearMagickWand(wand: PMagickWand); cdecl; external WandExport;
+procedure MagickWandGenesis; cdecl; external WandExport;
+procedure MagickWandTerminus; cdecl; external WandExport;
+function MagickRelinquishMemory(resource: Pointer): Pointer; cdecl; external WandExport;
+procedure MagickResetIterator(wand: PMagickWand); cdecl; external WandExport;
+procedure MagickSetFirstIterator(wand: PMagickWand); cdecl; external WandExport;
+procedure MagickSetLastIterator(wand: PMagickWand); cdecl; external WandExport;
+
+implementation
+
+end.

+ 74 - 0
lib/ImageMagick/wand/pixel_iterator.inc

@@ -0,0 +1,74 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  Pixel Iterator Methods.
+}
+
+type
+  PixelIterator = record
+    id: Cardinal;
+
+    name: array[0..MaxTextExtent] of char;
+
+    exception: ExceptionInfo;
+
+    view: PViewInfo;
+
+    region: RectangleInfo;
+
+    y: Integer;
+
+    pixel_wand: PPPixelWand;
+
+    debug: MagickBooleanType;
+
+    signature: Cardinal;
+  end;
+  
+  PPixelIterator = ^PixelIterator;
+
+
+function PixelGetIteratorException(const iterator: PPixeliterator;
+ severity: PExceptionType): PChar; cdecl; external WandExport;
+
+function IsPixelIterator(const iterator: PPixeliterator): MagickBooleanType; cdecl; external WandExport;
+function PixelClearIteratorException(iterator: PPixeliterator): MagickBooleanType; cdecl; external WandExport;
+function PixelSetIteratorRow(iterator: PPixeliterator;
+ const row: Integer): MagickBooleanType; cdecl; external WandExport;
+function PixelSyncIterator(iterator: PPixeliterator): MagickBooleanType; cdecl; external WandExport;
+
+function DestroyPixelIterator(iterator: PPixeliterator): PPixelIterator; cdecl; external WandExport;
+function NewPixelIterator(wand: PMagickWand): PPixelIterator; cdecl; external WandExport;
+function NewPixelRegionIterator(
+ wand: PMagickWand; const x, y: Integer; const columns, rows: Cardinal;
+ const modify: MagickBooleanType): PPixelIterator; cdecl; external WandExport;
+
+function PixelGetNextIteratorRow(iterator: PPixeliterator; var wandCount: Cardinal): PPPixelWand; cdecl; external WandExport;
+function PixelGetPreviousIteratorRow(iterator: PPixeliterator; var wandCount: Cardinal): PPPixelWand; cdecl; external WandExport;
+
+procedure ClearPixelIterator(iterator: PPixeliterator); cdecl; external WandExport;
+procedure PixelResetIterator(iterator: PPixeliterator); cdecl; external WandExport;
+procedure PixelSetFirstIteratorRow(iterator: PPixeliterator); cdecl; external WandExport;
+procedure PixelSetLastIteratorRow(iterator: PPixeliterator); cdecl; external WandExport;
+
+{
+  Deprecated.
+}
+{extern WandExport char
+  *PixelIteratorGetException(const PixelIterator *,ExceptionType *);
+
+extern WandExport PixelWand
+  **PixelGetNextRow(PixelIterator *);}
+

+ 109 - 0
lib/ImageMagick/wand/pixel_wand.inc

@@ -0,0 +1,109 @@
+{
+  Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization
+  dedicated to making software imaging solutions freely available.
+  
+  You may not use this file except in compliance with the License.
+  obtain a copy of the License at
+  
+    http://www.imagemagick.org/script/license.php
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ImageMagick pixel wand API.
+}
+
+
+{
+  Declaration from pixel-wand.c
+}
+type
+  PixelWand = record
+    id: Cardinal;
+
+    name: array[1..MaxTextExtent] of char;
+
+    exception: ExceptionInfo;
+
+    pixel: MagickPixelPacket;
+
+    count: Cardinal;
+
+    debug: MagickBooleanType;
+
+    signature: Cardinal;
+  end;
+  
+  PPixelWand = ^PixelWand;
+  
+  PPPixelWand = ^PPixelWand;
+  
+
+function PixelGetException(const wand: PPixelWand; severity: PExceptionType): PChar; cdecl; external WandExport;
+function PixelGetColorAsString(const wand: PPixelWand): PChar; cdecl; external WandExport;
+
+function PixelGetAlpha(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetBlack(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetBlue(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetCyan(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetGreen(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetMagenta(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetOpacity(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetRed(const wand: PPixelWand): Double; cdecl; external WandExport;
+function PixelGetYellow(const wand: PPixelWand): Double; cdecl; external WandExport;
+
+function PixelGetIndex(const wand: PPixelWand): IndexPacket; cdecl; external WandExport;
+
+function IsPixelWand(const wand: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function IsPixelWandSimilar(p: PPixelWand; q: PPixelWand;
+ const fuzz: double): MagickBooleanType; cdecl; external WandExport;
+function PixelClearException(wand: PPixelWand): MagickBooleanType; cdecl; external WandExport;
+function PixelSetColor(wand: PPixelWand; const color: PChar): MagickBooleanType; cdecl; external WandExport;
+
+function DestroyPixelWand(wand: PPixelWand): PPixelWand; cdecl; external WandExport;
+function DestroyPixelWands(wand: PPPixelWand;
+ const number_wands: Cardinal): PPPixelWand; cdecl; external WandExport;
+function NewPixelWand: PPixelWand; cdecl; external WandExport;
+function NewPixelWands(const number_wands: Cardinal): PPPixelWand; cdecl; external WandExport;
+
+function PixelGetAlphaQuantum(const wand: PPixelWand): Quantum; cdecl; external  WandExport;
+function PixelGetBlackQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+function PixelGetBlueQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+function PixelGetCyanQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+function PixelGetGreenQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+function PixelGetMagentaQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+function PixelGetOpacityQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+function PixelGetRedQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+function PixelGetYellowQuantum(const wand: PPixelWand): Quantum; cdecl; external WandExport;
+
+function PixelGetColorCount(const wand: PPixelWand): Cardinal; cdecl; external WandExport;
+
+procedure ClearPixelWand(wand: PPixelWand); cdecl; external WandExport;
+procedure PixelGetMagickColor(const wand: PPixelWand; packet: PMagickPixelPacket); cdecl; external WandExport;
+procedure PixelGetQuantumColor(const wand: PPixelWand; color: PPixelPacket); cdecl; external WandExport;
+procedure PixelSetAlpha(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetAlphaQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetBlack(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetBlackQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetBlue(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetBlueQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetColorCount(wand: PPixelWand; const count: Cardinal); cdecl; external WandExport;
+procedure PixelSetCyan(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetCyanQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetGreen(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetGreenQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetIndex(wand: PPixelWand; const index: IndexPacket); cdecl; external WandExport;
+procedure PixelSetMagenta(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetMagentaQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetOpacity(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetOpacityQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetQuantumColor(wand: PPixelWand; const color: PPixelPacket); cdecl; external WandExport;
+procedure PixelSetRed(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetRedQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+procedure PixelSetYellow(wand: PPixelWand; const opacity: Double); cdecl; external WandExport;
+procedure PixelSetYellowQuantum(wand: PPixelWand; const opacity: Quantum); cdecl; external WandExport;
+
+

+ 1966 - 0
lib/ZBar.pas

@@ -0,0 +1,1966 @@
+unit zbar;
+
+interface
+
+{$MINENUMSIZE 4}
+
+uses
+  Windows, SysUtils, Classes, Graphics {, dbc, DLL96V1, DLLSP96};
+
+// ------------------------------------------------------------------------
+// Copyright 2007-2009 (c) Jeff Brown <[email protected]>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA  02110-1301  USA
+//
+// http://sourceforge.net/projects/zbar
+// ------------------------------------------------------------------------*/
+// Conversion to Delphi Copyright 2009 (c) Stephen Boyd <[email protected]>
+
+// * @file
+// ZBar Barcode Reader C API definition
+///
+
+// * @mainpage
+//
+// interface to the barcode reader is available at several levels.
+// most applications will want to use the high-level interfaces:
+//
+// @section high-level High-Level Interfaces
+//
+// these interfaces wrap all library functionality into an easy-to-use
+// package for a specific toolkit:
+// - the "GTK+ 2.x widget" may be used with GTK GUI applications.  a
+// Python wrapper is included for PyGtk
+// - the @ref zbar::QZBar "Qt4 widget" may be used with Qt GUI
+// applications
+// - the Processor interface (in @ref c-processor "C" or @ref
+// zbar::Processor "C++") adds a scanning window to an application
+// with no GUI.
+//
+// @section mid-level Intermediate Interfaces
+//
+// building blocks used to construct high-level interfaces:
+// - the ImageScanner (in @ref c-imagescanner "C" or @ref
+// zbar::ImageScanner "C++") looks for barcodes in a library defined
+// image object
+// - the Window abstraction (in @ref c-window "C" or @ref
+// zbar::Window "C++") sinks library images, displaying them on the
+// platform display
+// - the Video abstraction (in @ref c-video "C" or @ref zbar::Video
+// "C++") sources library images from a video device
+//
+// @section low-level Low-Level Interfaces
+//
+// direct interaction with barcode scanning and decoding:
+// - the Scanner (in @ref c-scanner "C" or @ref zbar::Scanner "C++")
+// looks for barcodes in a linear intensity sample stream
+// - the Decoder (in @ref c-decoder "C" or @ref zbar::Decoder "C++")
+// extracts barcodes from a stream of bar and space widths
+///
+
+// * @name Global library interfaces */
+// @{*/
+
+// * "color" of element: bar or space. */
+type
+  zbar_color_e = (ZBAR_SPACE = 0, // *< light area or space between bars */
+    ZBAR_BAR = 1                  // *< dark area or colored bar segment */
+    );
+  zbar_color_t = zbar_color_e;
+
+  // * decoded symbol type. */
+type
+  zbar_symbol_type_e = (ZBAR_NONE = 0, // *< no symbol decoded */
+    ZBAR_PARTIAL = 1,                  // *< intermediate status */
+    ZBAR_EAN8 = 8,                     // *< EAN-8 */
+    ZBAR_UPCE = 9,                     // *< UPC-E */
+    ZBAR_ISBN10 = 10,                  // *< ISBN-10 (from EAN-13). @since 0.4 */
+    ZBAR_UPCA = 12,                    // *< UPC-A */
+    ZBAR_EAN13 = 13,                   // *< EAN-13 */
+    ZBAR_ISBN13 = 14,                  // *< ISBN-13 (from EAN-13). @since 0.4 */
+    ZBAR_I25 = 25,                     // *< Interleaved 2 of 5. @since 0.4 */
+    ZBAR_CODE39 = 39,                  // *< Code 39. @since 0.4 */
+    ZBAR_PDF417 = 57,                  // *< PDF417. @since 0.6 */
+    ZBAR_QRCODE = 64, //*< QR Code. @since 0.10 */
+    ZBAR_CODE128 = 128                 // *< Code 128 */
+  //ZBAR_SYMBOL = $00ff,               // *< mask for base symbol type */
+  //ZBAR_ADDON2 = $0200,               // *< 2-digit add-on flag */
+  //ZBAR_ADDON5 = $0500,               // *< 5-digit add-on flag */
+  //ZBAR_ADDON = $0700                 // *< add-on flag mask */
+    );
+  zbar_symbol_type_t = zbar_symbol_type_e;
+
+  // * error codes. */
+type
+  zbar_error_e = (ZBAR_OK = 0, // *< no error */
+    ZBAR_ERR_NOMEM,            // *< out of memory */
+    ZBAR_ERR_INTERNAL,         // *< internal library error */
+    ZBAR_ERR_UNSUPPORTED,      // *< unsupported request */
+    ZBAR_ERR_INVALID,          // *< invalid request */
+    ZBAR_ERR_SYSTEM,           // *< system error */
+    ZBAR_ERR_LOCKING,          // *< locking error */
+    ZBAR_ERR_BUSY,             // *< all resources busy */
+    ZBAR_ERR_XDISPLAY,         // *< X11 display error */
+    ZBAR_ERR_XPROTO,           // *< X11 protocol error */
+    ZBAR_ERR_CLOSED,           // *< output window is closed */
+    ZBAR_ERR_NUM               // *< number of error codes */
+    );
+  zbar_error_t = zbar_error_e;
+
+  // * decoder configuration options.
+  // @since 0.4
+  ///
+type
+  zbar_config_e = (ZBAR_CFG_ENABLE = 0, // *< enable symbology/feature */
+    ZBAR_CFG_ADD_CHECK,                 // *< enable check digit when optional */
+    ZBAR_CFG_EMIT_CHECK,                // *< return check digit when present */
+    ZBAR_CFG_ASCII,                     // *< enable full ASCII character set */
+    ZBAR_CFG_NUM,                       // *< number of boolean configs */
+
+    ZBAR_CFG_MIN_LEN = $20, // *< minimum data length for valid decode */
+    ZBAR_CFG_MAX_LEN,       // *< maximum data length for valid decode */
+
+    ZBAR_CFG_X_DENSITY = $100, // *< image scanner vertical scan density */
+    ZBAR_CFG_Y_DENSITY         // *< image scanner horizontal scan density */
+    );
+  zbar_config_t = zbar_config_e;
+
+  // * retrieve runtime library version information.
+  // @param major set to the running major version (unless NULL)
+  // @param minor set to the running minor version (unless NULL)
+  // @returns 0
+  ///
+function zbar_version(var major: Cardinal; var minor: Cardinal): Integer;
+
+// * set global library debug level.
+// @param verbosity desired debug level.  higher values create more spew
+///
+procedure zbar_set_verbosity(verbosity: Integer);
+
+// * increase global library debug level.
+// eg, for -vvvv
+///
+procedure zbar_increase_verbosity;
+
+// * retrieve string name for symbol encoding.
+// @param sym symbol type encoding
+// @returns the static string name for the specified symbol type,
+// or "UNKNOWN" if the encoding is not recognized
+///
+function zbar_get_symbol_name(sym: zbar_symbol_type_t): PAnsiChar;
+
+// * retrieve string name for addon encoding.
+// @param sym symbol type encoding
+// @returns static string name for any addon, or the empty string
+// if no addons were decoded
+///
+function zbar_get_addon_name(sym: zbar_symbol_type_t): PAnsiChar;
+
+// * parse a configuration string of the form "[symbology.]config[=value]".
+// the config must match one of the recognized names.
+// the symbology, if present, must match one of the recognized names.
+// if symbology is unspecified, it will be set to 0.
+// if value is unspecified it will be set to 1.
+// @returns 0 if the config is parsed successfully, 1 otherwise
+// @since 0.4
+///
+function zbar_parse_config(const config_string: PAnsiChar; var symbology: zbar_symbol_type_t; var config: zbar_config_t;
+  var value: Integer): Integer;
+
+// * @internal type unsafe error API (don't use) */
+function _zbar_error_spew(objekt: Pointer; verbosity: Integer): Integer;
+function _zbar_error_string(objekt: Pointer; verbosity: Integer): PAnsiChar;
+function _zbar_get_error_code(objekt: Pointer): zbar_error_t;
+
+// @}*/
+
+
+// ------------------------------------------------------------*/
+// * @name Symbol interface
+// decoded barcode symbol result object.  stores type, data, and image
+// location of decoded symbol.  all memory is owned by the library
+///
+// @{*/
+
+type
+  zbar_symbol_s = type Pointer;
+  // * opaque decoded symbol object. */
+  zbar_symbol_t = zbar_symbol_s;
+
+  // * retrieve type of decoded symbol.
+  // @returns the symbol type
+  ///
+function zbar_symbol_get_type(symbol: zbar_symbol_t): zbar_symbol_type_t;
+
+// * retrieve ASCII data decoded from symbol.
+// @returns the data string
+///
+function zbar_symbol_get_data(symbol: zbar_symbol_t): PAnsiChar;
+//Function zbar_symbol_get_data_length (symbol: zbar_symbol_t): integer;
+
+// * retrieve current cache count.  when the cache is enabled for the
+// image_scanner this provides inter-frame reliability and redundancy
+// information for video streams.
+// @returns < 0 if symbol is still uncertain.
+// @returns 0 if symbol is newly verified.
+// @returns > 0 for duplicate symbols
+///
+function zbar_symbol_get_count(symbol: zbar_symbol_t): Integer;
+
+// * retrieve the number of points in the location polygon.  the
+// location polygon defines the image area that the symbol was
+// extracted from.
+// @returns the number of points in the location polygon
+// @note this is currently not a polygon, but the scan locations
+// where the symbol was decoded
+///
+function zbar_symbol_get_loc_size(symbol: zbar_symbol_t): Cardinal;
+
+// * retrieve location polygon x-coordinates.
+// points are specified by 0-based index.
+// @returns the x-coordinate for a point in the location polygon.
+// @returns -1 if index is out of range
+///
+function zbar_symbol_get_loc_x(symbol: zbar_symbol_t; index: Cardinal): Integer;
+
+// * retrieve location polygon y-coordinates.
+// points are specified by 0-based index.
+// @returns the y-coordinate for a point in the location polygon.
+// @returns -1 if index is out of range
+///
+function zbar_symbol_get_loc_y(symbol: zbar_symbol_t; index: Cardinal): Integer;
+
+// * iterate the result set.
+// @returns the next result symbol, or
+// @returns NULL when no more results are available
+///
+function zbar_symbol_next(symbol: zbar_symbol_t): zbar_symbol_t;
+
+// * print XML symbol element representation to user result buffer.
+// @see http://zbar.sourceforge.net/2008/barcode.xsd for the schema.
+// @param symbol is the symbol to print
+// @param buffer is the inout result pointer, it will be reallocated
+// with a larger size if necessary.
+// @param buflen is inout length of the result buffer.
+// @returns the buffer pointer
+// @since 0.6
+///
+function zbar_symbol_xml(symbol: zbar_symbol_t; var buffer: PAnsiChar; var buflen: Cardinal): PAnsiChar;
+
+// @}*/
+
+// ------------------------------------------------------------*/
+// * @name Image interface
+// stores image data samples along with associated format and size
+// metadata
+///
+// @{*/
+
+type
+  zbar_image_s = type Pointer;
+  // * opaque image object. */
+  zbar_image_t = zbar_image_s;
+  // * cleanup handler callback function.
+  // called to free sample data when an image is destroyed.
+  ///
+  zbar_image_cleanup_handler_t = procedure(image: zbar_image_t); cdecl;
+  // * data handler callback function.
+  // called when decoded symbol results are available for an image
+  ///
+  zbar_image_data_handler_t = procedure(image: zbar_image_t; userdata: Pointer); cdecl;
+
+  // * new image constructor.
+  // @returns a new image object with uninitialized data and format.
+  // this image should be destroyed (using zbar_image_destroy()) as
+  // soon as the application is finished with it
+  ///
+function zbar_image_create: zbar_image_t;
+
+// * image destructor.  all images created by or returned to the
+// application should be destroyed using this function.  when an image
+// is destroyed, the associated data cleanup handler will be invoked
+// if available
+// @note make no assumptions about the image or the data buffer.
+// they may not be destroyed/cleaned immediately if the library
+// is still using them.  if necessary, use the cleanup handler hook
+// to keep track of image data buffers
+///
+procedure zbar_image_destroy(image: zbar_image_t);
+
+// * image reference count manipulation.
+// increment the reference count when you store a new reference to the
+// image.  decrement when the reference is no longer used.  do not
+// refer to the image any longer once the count is decremented.
+// zbar_image_ref(image, -1) is the same as zbar_image_destroy(image)
+// @since 0.5
+///
+procedure zbar_image_ref(image: zbar_image_t; refs: Integer);
+
+// * image format conversion.  refer to the documentation for supported
+// image formats
+// @returns a @em new image with the sample data from the original image
+// converted to the requested format.  the original image is
+// unaffected.
+// @note the converted image size may be rounded (up) due to format
+// constraints
+///
+function zbar_image_convert(image: zbar_image_t; format: PAnsiChar): zbar_image_t;
+
+// * image format conversion with crop/pad.
+// if the requested size is larger than the image, the last row/column
+// are duplicated to cover the difference.  if the requested size is
+// smaller than the image, the extra rows/columns are dropped from the
+// right/bottom.
+// @returns a @em new image with the sample data from the original
+// image converted to the requested format and size.
+// @note the image is @em not scaled
+// @see zbar_image_convert()
+// @since 0.4
+///
+function zbar_image_convert_resize(image: zbar_image_t; format: PAnsiChar; width: Cardinal; height: Cardinal): zbar_image_t;
+
+// * retrieve the image format.
+// @returns the fourcc describing the format of the image sample data
+///
+function zbar_image_get_format(image: zbar_image_t): Cardinal;
+
+// * retrieve a "sequence" (page/frame) number associated with this image.
+// @since 0.6
+///
+function zbar_image_get_sequence(image: zbar_image_t): Cardinal;
+
+// * retrieve the width of the image.
+// @returns the width in sample columns
+///
+function zbar_image_get_width(image: zbar_image_t): Cardinal;
+
+// * retrieve the height of the image.
+// @returns the height in sample rows
+///
+function zbar_image_get_height(image: zbar_image_t): Cardinal;
+
+// * return the image sample data.  the returned data buffer is only
+// valid until zbar_image_destroy() is called
+///
+function zbar_image_get_data(image: zbar_image_t): Pointer;
+
+// * return the size of image data.
+// @since 0.6
+///
+function zbar_image_get_data_length(img: zbar_image_t): Cardinal;
+
+// * image_scanner decode result iterator.
+// @returns the first decoded symbol result for an image
+// or NULL if no results are available
+///
+function zbar_image_first_symbol(image: zbar_image_t): zbar_symbol_t;
+
+// * specify the fourcc image format code for image sample data.
+// refer to the documentation for supported formats.
+// @note this does not convert the data!
+// (see zbar_image_convert() for that)
+///
+procedure zbar_image_set_format(image: zbar_image_t; format: PAnsiChar);
+
+// * associate a "sequence" (page/frame) number with this image.
+// @since 0.6
+///
+procedure zbar_image_set_sequence(image: zbar_image_t; sequence_num: Cardinal);
+
+// * specify the pixel size of the image.
+// @note this does not affect the data!
+///
+procedure zbar_image_set_size(image: zbar_image_t; width: Cardinal; height: Cardinal);
+
+// * specify image sample data.  when image data is no longer needed by
+// the library the specific data cleanup handler will be called
+// (unless NULL)
+// @note application image data will not be modified by the library
+///
+procedure zbar_image_set_data(image: zbar_image_t; data: Pointer; data_byte_length: Cardinal;
+  cleanup_hndlr: zbar_image_cleanup_handler_t);
+
+// * built-in cleanup handler.
+// passes the image data buffer to free()
+///
+procedure zbar_image_free_data(image: zbar_image_t);
+
+// * associate user specified data value with an image.
+// @since 0.5
+///
+procedure zbar_image_set_userdata(image: zbar_image_t; userdata: Pointer);
+
+// * return user specified data value associated with the image.
+// @since 0.5
+///
+function zbar_image_get_userdata(image: zbar_image_t): Pointer;
+
+// * dump raw image data to a file for debug.
+// the data will be prefixed with a 16 byte header consisting of:
+// - 4 bytes uint = 0x676d697a ("zimg")
+// - 4 bytes format fourcc
+// - 2 bytes width
+// - 2 bytes height
+// - 4 bytes size of following image data in bytes
+// this header can be dumped w/eg:
+// @verbatim
+// od -Ax -tx1z -N16 -w4 [file]
+// @endverbatim
+// for some formats the image can be displayed/converted using
+// ImageMagick, eg:
+// @verbatim
+// display -size 640x480+16 [-depth ?] [-sampling-factor ?x?] \
+// {GRAY,RGB,UYVY,YUV}:[file]
+// @endverbatim
+//
+// @param image the image object to dump
+// @param filebase base filename, appended with ".XXXX.zimg" where
+// XXXX is the format fourcc
+// @returns 0 on success or a system error code on failure
+///
+function zbar_image_write(image: zbar_image_t; filebase: PAnsiChar): Integer;
+
+// * read back an image in the format written by zbar_image_write()
+// @note TBD
+///
+function zbar_image_read(filename: PAnsiChar): zbar_image_t;
+
+// @}*/
+// *------------------------------------------------------------*/
+// * @name Processor interface
+// @anchor c-processor
+// high-level self-contained image processor.
+// processes video and images for barcodes, optionally displaying
+// images to a library owned output window
+///
+// @{*/
+
+type
+  zbar_processor_s = type Pointer;
+  // * opaque standalone processor object. */
+  zbar_processor_t = zbar_processor_s;
+
+  // * constructor.
+  // if threaded is set and threading is available the processor
+  // will spawn threads where appropriate to avoid blocking and
+  // improve responsiveness
+  ///
+function zbar_processor_create(threaded: Integer): zbar_processor_t;
+
+// * destructor.  cleans up all resources associated with the processor
+///
+procedure zbar_processor_destroy(processor: zbar_processor_t);
+
+// * (re)initialization.
+// opens a video input device and/or prepares to display output
+///
+function zbar_processor_init(processor: zbar_processor_t; video_device: PAnsiChar; enable_display: Integer): Integer;
+
+// * request a preferred size for the video image from the device.
+// the request may be adjusted or completely ignored by the driver.
+// @note must be called before zbar_processor_init()
+// @since 0.6
+///
+function zbar_processor_request_size(processor: zbar_processor_t; width: Cardinal; height: Cardinal): Integer;
+
+// * request a preferred video driver interface version for
+// debug/testing.
+// @note must be called before zbar_processor_init()
+// @since 0.6
+///
+function zbar_processor_request_interface(processor: zbar_processor_t; version: Integer): Integer;
+
+// * request a preferred video I/O mode for debug/testing.  You will
+// get errors if the driver does not support the specified mode.
+// @verbatim
+// 0 = auto-detect
+// 1 = force I/O using read()
+// 2 = force memory mapped I/O using mmap()
+// 3 = force USERPTR I/O (v4l2 only)
+// @endverbatim
+// @note must be called before zbar_processor_init()
+// @since 0.7
+///
+function zbar_processor_request_iomode(video: zbar_processor_t; iomode: Integer): Integer;
+
+// * force specific input and output formats for debug/testing.
+// @note must be called before zbar_processor_init()
+///
+function zbar_processor_force_format(processor: zbar_processor_t; input_format: Cardinal;
+  output_format: Cardinal): Integer;
+
+// * setup result handler callback.
+// the specified function will be called by the processor whenever
+// new results are available from the video stream or a static image.
+// pass a NULL value to disable callbacks.
+// @param processor the object on which to set the handler.
+// @param handler the function to call when new results are available.
+// @param userdata is set as with zbar_processor_set_userdata().
+// @returns the previously registered handler
+///
+function zbar_processor_set_data_handler(processor: zbar_processor_t; handler: zbar_image_data_handler_t;
+  userdata: PAnsiChar): zbar_image_data_handler_t;
+
+// * associate user specified data value with the processor.
+// @since 0.6
+///
+procedure zbar_processor_set_userdata(processor: zbar_processor_t; userdata: Pointer);
+
+// * return user specified data value associated with the processor.
+// @since 0.6
+///
+function zbar_processor_get_userdata(processor: zbar_processor_t): Pointer;
+
+// * set config for indicated symbology (0 for all) to specified value.
+// @returns 0 for success, non-0 for failure (config does not apply to
+// specified symbology, or value out of range)
+// @see zbar_decoder_set_config()
+// @since 0.4
+///
+function zbar_processor_set_config(processor: zbar_processor_t; symbology: zbar_symbol_type_t; config: zbar_config_t;
+  value: Integer): Integer;
+
+// * parse configuration string using zbar_parse_config()
+// and apply to processor using zbar_processor_set_config().
+// @returns 0 for success, non-0 for failure
+// @see zbar_parse_config()
+// @see zbar_processor_set_config()
+// @since 0.4
+///
+function zbar_processor_parse_config(processor: zbar_processor_t; config_string: PAnsiChar): Integer;
+
+// * retrieve the current state of the ouput window.
+// @returns 1 if the output window is currently displayed, 0 if not.
+// @returns -1 if an error occurs
+///
+function zbar_processor_is_visible(processor: zbar_processor_t): Integer;
+
+// * show or hide the display window owned by the library.
+// the size will be adjusted to the input size
+///
+function zbar_processor_set_visible(processor: zbar_processor_t; visible: Integer): Integer;
+
+// * control the processor in free running video mode.
+// only works if video input is initialized. if threading is in use,
+// scanning will occur in the background, otherwise this is only
+// useful wrapping calls to zbar_processor_user_wait(). if the
+// library output window is visible, video display will be enabled.
+///
+function zbar_processor_set_active(processor: zbar_processor_t; active: Integer): Integer;
+
+// * wait for input to the display window from the user
+// (via mouse or keyboard).
+// @returns >0 when input is received, 0 if timeout ms expired
+// with no input or -1 in case of an error
+///
+function zbar_processor_user_wait(processor: zbar_processor_t; timeout: Integer): Integer;
+
+// * process from the video stream until a result is available,
+// or the timeout (in milliseconds) expires.
+// specify a timeout of -1 to scan indefinitely
+// (zbar_processor_set_active() may still be used to abort the scan
+// from another thread).
+// if the library window is visible, video display will be enabled.
+// @note that multiple results may still be returned (despite the
+// name).
+// @returns >0 if symbols were successfully decoded,
+// 0 if no symbols were found (ie, the timeout expired)
+// or -1 if an error occurs
+///
+function zbar_process_one(processor: zbar_processor_t; timeout: Integer): Integer;
+
+// * process the provided image for barcodes.
+// if the library window is visible, the image will be displayed.
+// @returns >0 if symbols were successfully decoded,
+// 0 if no symbols were found or -1 if an error occurs
+///
+function zbar_process_image(processor: zbar_processor_t; image: zbar_image_t): Integer;
+
+// * display detail for last processor error to stderr.
+// @returns a non-zero value suitable for passing to exit()
+///
+function zbar_processor_error_spew(processor: zbar_processor_t; verbosity: Integer): Integer;
+
+// * retrieve the detail string for the last processor error. */
+function zbar_processor_error_string(processor: zbar_processor_t; verbosity: Integer): PAnsiChar;
+
+// * retrieve the type code for the last processor error. */
+function zbar_processor_get_error_code(processor: zbar_processor_t): zbar_error_t;
+
+// @}*/
+
+// ------------------------------------------------------------*/
+// * @name Video interface
+// @anchor c-video
+// mid-level video source abstraction.
+// captures images from a video device
+///
+// @{*/
+
+type
+  zbar_video_s = type Pointer;
+  // * opaque video object. */
+  zbar_video_t = zbar_video_s;
+
+  // * constructor. */
+function zbar_video_create: zbar_video_t;
+
+// * destructor. */
+procedure zbar_video_destroy(video: zbar_video_t);
+
+// * open and probe a video device.
+// the device specified by platform specific unique name
+// (v4l device node path in *nix eg "/dev/video",
+// DirectShow DevicePath property in windows).
+// @returns 0 if successful or -1 if an error occurs
+///
+function zbar_video_open(video: zbar_video_t; device: PAnsiChar): Integer;
+
+// * retrieve file descriptor associated with open *nix video device
+// useful for using select()/poll() to tell when new images are
+// available (NB v4l2 only!!).
+// @returns the file descriptor or -1 if the video device is not open
+// or the driver only supports v4l1
+///
+function zbar_video_get_fd(video: zbar_video_t): Integer;
+
+// * request a preferred size for the video image from the device.
+// the request may be adjusted or completely ignored by the driver.
+// @returns 0 if successful or -1 if the video device is already
+// initialized
+// @since 0.6
+///
+function zbar_video_request_size(video: zbar_video_t; width: Cardinal; height: Cardinal): Integer;
+
+// * request a preferred driver interface version for debug/testing.
+// @note must be called before zbar_video_open()
+// @since 0.6
+///
+function zbar_video_request_interface(video: zbar_video_t; version: Integer): Integer;
+
+// * request a preferred I/O mode for debug/testing.  You will get
+// errors if the driver does not support the specified mode.
+// @verbatim
+// 0 = auto-detect
+// 1 = force I/O using read()
+// 2 = force memory mapped I/O using mmap()
+// 3 = force USERPTR I/O (v4l2 only)
+// @endverbatim
+// @note must be called before zbar_video_open()
+// @since 0.7
+///
+function zbar_video_request_iomode(video: zbar_video_t; iomode: Integer): Integer;
+
+// * retrieve current output image width.
+// @returns the width or 0 if the video device is not open
+///
+function zbar_video_get_width(video: zbar_video_t): Integer;
+
+// * retrieve current output image height.
+// @returns the height or 0 if the video device is not open
+///
+function zbar_video_get_height(video: zbar_video_t): Integer;
+
+// * initialize video using a specific format for debug.
+// use zbar_negotiate_format() to automatically select and initialize
+// the best available format
+///
+function zbar_video_init(video: zbar_video_t; format: Cardinal): Integer;
+
+// * start/stop video capture.
+// all buffered images are retired when capture is disabled.
+// @returns 0 if successful or -1 if an error occurs
+///
+function zbar_video_enable(video: zbar_video_t; enable: Integer): Integer;
+
+// * retrieve next captured image.  blocks until an image is available.
+// @returns NULL if video is not enabled or an error occurs
+///
+function zbar_video_next_image(video: zbar_video_t): zbar_image_t;
+
+// * display detail for last video error to stderr.
+// @returns a non-zero value suitable for passing to exit()
+///
+function zbar_video_error_spew(video: zbar_video_t; verbosity: Integer): Integer;
+
+// * retrieve the detail string for the last video error. */
+function zbar_video_error_string(video: zbar_video_t; verbosity: Integer): PAnsiChar;
+
+// * retrieve the type code for the last video error. */
+function zbar_video_get_error_code(video: zbar_video_t): zbar_error_t;
+
+// @}*/
+
+// ------------------------------------------------------------*/
+// * @name Window interface
+// @anchor c-window
+// mid-level output window abstraction.
+// displays images to user-specified platform specific output window
+///
+// @{*/
+
+type
+  zbar_window_s = type Pointer;
+  // * opaque window object. */
+  zbar_window_t = zbar_window_s;
+
+  // * constructor. */
+function zbar_window_create: zbar_window_t;
+
+// * destructor. */
+procedure zbar_window_destroy(window: zbar_window_t);
+
+// * associate reader with an existing platform window.
+// This can be any "Drawable" for X Windows or a "HWND" for windows.
+// input images will be scaled into the output window.
+// pass NULL to detach from the resource, further input will be
+// ignored
+///
+function zbar_window_attach(window: zbar_window_t; x11_display_w32_hwnd: Pointer; x11_drawable: Cardinal): Integer;
+
+// * control content level of the reader overlay.
+// the overlay displays graphical data for informational or debug
+// purposes.  higher values increase the level of annotation (possibly
+// decreasing performance). @verbatim
+// 0 = disable overlay
+// 1 = outline decoded symbols (default)
+// 2 = also track and display input frame rate
+// @endverbatim
+///
+procedure zbar_window_set_overlay(window: zbar_window_t; level: Integer);
+
+// * draw a new image into the output window. */
+function zbar_window_draw(window: zbar_window_t; image: zbar_image_t): Integer;
+
+// * redraw the last image (exposure handler). */
+function zbar_window_redraw(window: zbar_window_t): Integer;
+
+// * resize the image window (reconfigure handler).
+// this does @em not update the contents of the window
+// @since 0.3, changed in 0.4 to not redraw window
+///
+function zbar_window_resize(window: zbar_window_t; width: Cardinal; height: Cardinal): Integer;
+
+// * display detail for last window error to stderr.
+// @returns a non-zero value suitable for passing to exit()
+///
+function zbar_window_error_spew(window: zbar_window_t; verbosity: Integer): Integer;
+
+// * retrieve the detail string for the last window error. */
+function zbar_window_error_string(window: zbar_window_t; verbosity: Integer): PAnsiChar;
+
+// * retrieve the type code for the last window error. */
+function zbar_window_get_error_code(window: zbar_window_t): zbar_error_t;
+
+// * select a compatible format between video input and output window.
+// the selection algorithm attempts to use a format shared by
+// video input and window output which is also most useful for
+// barcode scanning.  if a format conversion is necessary, it will
+// heuristically attempt to minimize the cost of the conversion
+///
+function zbar_negotiate_format(video: zbar_video_t; window: zbar_window_t): Integer;
+
+// @}*/
+
+// ------------------------------------------------------------*/
+// * @name Image Scanner interface
+// @anchor c-imagescanner
+// mid-level image scanner interface.
+// reads barcodes from 2-D images
+///
+// @{*/
+
+type
+  zbar_image_scanner_s = type Pointer;
+  // * opaque image scanner object. */
+  zbar_image_scanner_t = zbar_image_scanner_s;
+
+  // * constructor. */
+function zbar_image_scanner_create: zbar_image_scanner_t;
+
+// * destructor. */
+procedure zbar_image_scanner_destroy(scanner: zbar_image_scanner_t);
+
+// * setup result handler callback.
+// the specified function will be called by the scanner whenever
+// new results are available from a decoded image.
+// pass a NULL value to disable callbacks.
+// @returns the previously registered handler
+///
+function zbar_image_scanner_set_data_handler(scanner: zbar_image_scanner_t; handler: zbar_image_data_handler_t;
+  userdata: Pointer): zbar_image_data_handler_t;
+
+// * set config for indicated symbology (0 for all) to specified value.
+// @returns 0 for success, non-0 for failure (config does not apply to
+// specified symbology, or value out of range)
+// @see zbar_decoder_set_config()
+// @since 0.4
+///
+function zbar_image_scanner_set_config(scanner: zbar_image_scanner_t; symbology: zbar_symbol_type_t;
+  config: zbar_config_t; value: Integer): Integer;
+
+// * parse configuration string using zbar_parse_config()
+// and apply to image scanner using zbar_image_scanner_set_config().
+// @returns 0 for success, non-0 for failure
+// @see zbar_parse_config()
+// @see zbar_image_scanner_set_config()
+// @since 0.4
+///
+function zbar_image_scanner_parse_config(scanner: zbar_image_scanner_t; config_string: PAnsiChar): Integer;
+
+// * enable or disable the inter-image result cache (default disabled).
+// mostly useful for scanning video frames, the cache filters
+// duplicate results from consecutive images, while adding some
+// consistency checking and hysteresis to the results.
+// this interface also clears the cache
+///
+procedure zbar_image_scanner_enable_cache(scanner: zbar_image_scanner_t; enable: Integer);
+
+// * scan for symbols in provided image.
+// @returns >0 if symbols were successfully decoded from the image,
+// 0 if no symbols were found or -1 if an error occurs
+///
+function zbar_scan_image(scanner: zbar_image_scanner_t; image: zbar_image_t): Integer;
+
+// @}*/
+
+// ------------------------------------------------------------*/
+// * @name Decoder interface
+// @anchor c-decoder
+// low-level bar width stream decoder interface.
+// identifies symbols and extracts encoded data
+///
+// @{*/
+
+type
+  zbar_decoder_s = type Pointer;
+  // * opaque decoder object. */
+  zbar_decoder_t = zbar_decoder_s;
+
+  // * decoder data handler callback function.
+  // called by decoder when new data has just been decoded
+  ///
+  zbar_decoder_handler_t = procedure(decoder: zbar_decoder_t);
+
+  // * constructor. */
+function zbar_decoder_create: zbar_decoder_t;
+
+// * destructor. */
+procedure zbar_decoder_destroy(decoder: zbar_decoder_t);
+
+// * set config for indicated symbology (0 for all) to specified value.
+// @returns 0 for success, non-0 for failure (config does not apply to
+// specified symbology, or value out of range)
+// @since 0.4
+///
+function zbar_decoder_set_config(decoder: zbar_decoder_t; symbology: zbar_symbol_type_t; config: zbar_config_t;
+  value: Integer): Integer;
+
+// * parse configuration string using zbar_parse_config()
+// and apply to decoder using zbar_decoder_set_config().
+// @returns 0 for success, non-0 for failure
+// @see zbar_parse_config()
+// @see zbar_decoder_set_config()
+// @since 0.4
+///
+function zbar_decoder_parse_config(decoder: zbar_decoder_t; config_string: PAnsiChar): Integer;
+
+// * clear all decoder state.
+// any partial symbols are flushed
+///
+procedure zbar_decoder_reset(decoder: zbar_decoder_t);
+
+// * mark start of a new scan pass.
+// clears any intra-symbol state and resets color to ::ZBAR_SPACE.
+// any partially decoded symbol state is retained
+///
+procedure zbar_decoder_new_scan(decoder: zbar_decoder_t);
+
+// * process next bar/space width from input stream.
+// the width is in arbitrary relative units.  first value of a scan
+// is ::ZBAR_SPACE width, alternating from there.
+// @returns appropriate symbol type if width completes
+// decode of a symbol (data is available for retrieval)
+// @returns ::ZBAR_PARTIAL as a hint if part of a symbol was decoded
+// @returns ::ZBAR_NONE (0) if no new symbol data is available
+///
+function zbar_decode_width(decoder: zbar_decoder_t; width: Cardinal): zbar_symbol_type_t;
+
+// * retrieve color of @em next element passed to
+// zbar_decode_width(). */
+function zbar_decoder_get_color(decoder: zbar_decoder_t): zbar_color_t;
+
+// * retrieve last decoded data in ASCII format.
+// @returns the data string or NULL if no new data available.
+// the returned data buffer is owned by library, contents are only
+// valid between non-0 return from zbar_decode_width and next library
+// call
+///
+function zbar_decoder_get_data(decoder: zbar_decoder_t): PAnsiChar;
+
+// * retrieve last decoded symbol type.
+// @returns the type or ::ZBAR_NONE if no new data available
+///
+function zbar_decoder_get_type(decoder: zbar_decoder_t): zbar_symbol_type_t;
+
+// * setup data handler callback.
+// the registered function will be called by the decoder
+// just before zbar_decode_width() returns a non-zero value.
+// pass a NULL value to disable callbacks.
+// @returns the previously registered handler
+///
+function zbar_decoder_set_handler(decoder: zbar_decoder_t; handler: zbar_decoder_handler_t): zbar_decoder_handler_t;
+
+// * associate user specified data value with the decoder. */
+procedure zbar_decoder_set_userdata(decoder: zbar_decoder_t; userdata: Pointer);
+
+// * return user specified data value associated with the decoder. */
+function zbar_decoder_get_userdata(decoder: zbar_decoder_t): Pointer;
+
+// @}*/
+
+// ------------------------------------------------------------*/
+// * @name Scanner interface
+// @anchor c-scanner
+// low-level linear intensity sample stream scanner interface.
+// identifies "bar" edges and measures width between them.
+// optionally passes to bar width decoder
+///
+// @{*/
+
+type
+  zbar_scanner_s = type Pointer;
+  // * opaque scanner object. */
+  zbar_scanner_t = zbar_scanner_s;
+
+  // * constructor.
+  // if decoder is non-NULL it will be attached to scanner
+  // and called automatically at each new edge
+  // current color is initialized to ::ZBAR_SPACE
+  // (so an initial BAR->SPACE transition may be discarded)
+  ///
+function zbar_scanner_create(decoder: zbar_decoder_t): zbar_scanner_t;
+
+// * destructor. */
+procedure zbar_scanner_destroy(scanner: zbar_scanner_t);
+
+// * clear all scanner state.
+// also resets an associated decoder
+///
+function zbar_scanner_reset(scanner: zbar_scanner_t): zbar_symbol_type_t;
+
+// * mark start of a new scan pass. resets color to ::ZBAR_SPACE.
+// also updates an associated decoder.
+// @returns any decode results flushed from the pipeline
+// @note when not using callback handlers, the return value should
+// be checked the same as zbar_scan_y()
+///
+function zbar_scanner_new_scan(scanner: zbar_scanner_t): zbar_symbol_type_t;
+
+// * process next sample intensity value.
+// intensity (y) is in arbitrary relative units.
+// @returns result of zbar_decode_width() if a decoder is attached,
+// otherwise @returns (::ZBAR_PARTIAL) when new edge is detected
+// or 0 (::ZBAR_NONE) if no new edge is detected
+///
+function zbar_scan_y(scanner: zbar_scanner_t; y: Integer): zbar_symbol_type_t;
+
+// * process next sample from RGB (or BGR) triple. */
+function zbar_scan_rgb24(scanner: zbar_scanner_t; rgb: PAnsiChar): zbar_symbol_type_t;
+
+// * retrieve last scanned width. */
+function zbar_scanner_get_width(scanner: zbar_scanner_t): Cardinal;
+
+// * retrieve last scanned color. */
+function zbar_scanner_get_color(scanner: zbar_scanner_t): zbar_color_t;
+
+// Returns True if the ZBAR dll has been found and loaded
+function zbar_loaded: Boolean;
+
+// A table to equate bar code type enum values to descriptive names
+type
+  TZbarBarcodeRecord = record
+    BCCode: zbar_symbol_type_e;
+    BCName: AnsiString;
+  end;
+
+{const
+  ZBAR_BARCODES: array [0 .. 9] of TZbarBarcodeRecord = ((BCCode: ZBAR_EAN8; BCName: 'EAN-8'), (BCCode: ZBAR_UPCE;
+      BCName: 'UPCE'), (BCCode: ZBAR_ISBN10; BCName: 'ISBN-10'), (BCCode: ZBAR_UPCA; BCName: 'UPCA'),
+    (BCCode: ZBAR_EAN13; BCName: 'EAN-13'), (BCCode: ZBAR_ISBN13; BCName: 'ISBN-13'), (BCCode: ZBAR_I25;
+      BCName: 'Interleaved 2 0f 5'), (BCCode: ZBAR_CODE39; BCName: 'Code39'), (BCCode: ZBAR_PDF417; BCName: 'PDF417'),
+    (BCCode: ZBAR_CODE128; BCName: 'Code128'));          }
+const
+  ZBAR_BARCODES: array[0..10] of TZbarBarcodeRecord = (
+    (BCCode: ZBAR_EAN8; BCName: 'EAN-8'),
+    (BCCode: ZBAR_UPCE; BCName: 'UPCE'),
+    (BCCode: ZBAR_ISBN10; BCName: 'ISBN-10'),
+    (BCCode: ZBAR_UPCA; BCName: 'UPCA'),
+    (BCCode: ZBAR_EAN13; BCName: 'EAN-13'),
+    (BCCode: ZBAR_ISBN13; BCName: 'ISBN-13'),
+    (BCCode: ZBAR_I25; BCName: 'Interleaved 2 0f 5'),
+    (BCCode: ZBAR_CODE39; BCName: 'Code39'),
+    (BCCode: ZBAR_PDF417; BCName: 'PDF417'),
+    (BCCode: ZBAR_CODE128; BCName: 'Code128'),
+    (BCCode: ZBAR_QRCODE; BCName: 'QR')
+    );
+
+implementation
+
+var
+  DllHandle: THandle;
+
+procedure GetAddressOf(procName: AnsiString; var procPtr: Pointer);
+begin
+  if (DllHandle = 0) then
+    raise Exception.Create('libzbar-0.dll not found');
+  procPtr := GetProcAddress(DllHandle, PAnsiChar(procName));
+  if (not Assigned(procPtr)) then
+    raise Exception.CreateFmt('Entry point %s not found in libzbar-0.dll', [procName]);
+end;
+
+function zbar_loaded: Boolean;
+begin
+  Result := DllHandle <> 0;
+end;
+
+function zbar_version(var major: Cardinal; var minor: Cardinal): Integer;
+var
+  proc: function(var major: Cardinal; var minor: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_version', @proc);
+  Result := proc(major, minor);
+end;
+
+procedure zbar_set_verbosity(verbosity: Integer);
+var
+  proc: procedure(verbosity: Integer); cdecl;
+begin
+  GetAddressOf('zbar_set_verbosity', @proc);
+  proc(verbosity);
+end;
+
+procedure zbar_increase_verbosity;
+var
+  proc: procedure; cdecl;
+begin
+  GetAddressOf('zbar_increase_verbosity', @proc);
+  proc;
+end;
+
+function zbar_get_symbol_name(sym: zbar_symbol_type_t): PAnsiChar;
+var
+  proc: function(sym: zbar_symbol_type_t): PAnsiChar; cdecl;
+begin
+  GetAddressOf('zbar_get_symbol_name', @proc);
+  Result := proc(sym);
+end;
+
+function zbar_get_addon_name(sym: zbar_symbol_type_t): PAnsiChar;
+var
+  proc: function(sym: zbar_symbol_type_t): PAnsiChar; cdecl;
+begin
+  GetAddressOf('zbar_get_addon_name', @proc);
+  Result := proc(sym);
+end;
+
+function zbar_parse_config(const config_string: PAnsiChar; var symbology: zbar_symbol_type_t; var config: zbar_config_t;
+  var value: Integer): Integer;
+var
+  proc: function(const config_string: PAnsiChar; var symbology: zbar_symbol_type_t; var config: zbar_config_t;
+    var value: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_parse_config', @proc);
+  Result := proc(config_string, symbology, config, value);
+end;
+
+function _zbar_error_spew(objekt: Pointer; verbosity: Integer): Integer;
+var
+  proc: function(objekt: Pointer; verbosity: Integer): Integer; cdecl;
+begin
+  GetAddressOf('_zbar_error_spew', @proc);
+  Result := proc(objekt, verbosity);
+end;
+
+function _zbar_error_string(objekt: Pointer; verbosity: Integer): PAnsiChar;
+var
+  proc: function(objekt: Pointer; verbosity: Integer): PAnsiChar; cdecl;
+begin
+  GetAddressOf('_zbar_error_string', @proc);
+  Result := proc(objekt, verbosity);
+end;
+
+function _zbar_get_error_code(objekt: Pointer): zbar_error_t;
+var
+  proc: function(objekt: Pointer): zbar_error_t; cdecl;
+begin
+  GetAddressOf('_zbar_get_error_code', @proc);
+  Result := proc(objekt);
+end;
+
+function zbar_symbol_get_type(symbol: zbar_symbol_t): zbar_symbol_type_t;
+var
+  proc: function(symbol: zbar_symbol_t): zbar_symbol_type_t; cdecl;
+begin
+  GetAddressOf('zbar_symbol_get_type', @proc);
+  Result := proc(symbol);
+end;
+
+{Function zbar_symbol_get_data_length (symbol: zbar_symbol_t): integer;
+var
+  proc: function(symbol: zbar_symbol_t): integer; cdecl;
+begin
+  GetAddressOf('zbar_symbol_get_type', @proc);
+  Result := proc(symbol.datalen);
+end; }
+
+
+
+function zbar_symbol_get_data(symbol: zbar_symbol_t): PAnsiChar;
+var
+  proc: function(symbol: zbar_symbol_t): PAnsiChar; cdecl;
+begin
+  GetAddressOf('zbar_symbol_get_data', @proc);
+  Result := proc(symbol);
+end;
+
+function zbar_symbol_get_count(symbol: zbar_symbol_t): Integer;
+var
+  proc: function(symbol: zbar_symbol_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_symbol_get_count', @proc);
+  Result := proc(symbol);
+end;
+
+function zbar_symbol_get_loc_size(symbol: zbar_symbol_t): Cardinal;
+var
+  proc: function(symbol: zbar_symbol_t): Cardinal; cdecl;
+begin
+  GetAddressOf('zbar_symbol_get_loc_size', @proc);
+  Result := proc(symbol);
+end;
+
+function zbar_symbol_get_loc_x(symbol: zbar_symbol_t; index: Cardinal): Integer;
+var
+  proc: function(symbol: zbar_symbol_t; index: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_symbol_get_loc_x', @proc);
+  Result := proc(symbol, index);
+end;
+
+function zbar_symbol_get_loc_y(symbol: zbar_symbol_t; index: Cardinal): Integer;
+var
+  proc: function(symbol: zbar_symbol_t; index: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_symbol_get_loc_y', @proc);
+  Result := proc(symbol, index);
+end;
+
+function zbar_symbol_next(symbol: zbar_symbol_t): zbar_symbol_t;
+var
+  proc: function(symbol: zbar_symbol_t): zbar_symbol_t; cdecl;
+begin
+  GetAddressOf('zbar_symbol_next', @proc);
+  Result := proc(symbol);
+end;
+
+function zbar_symbol_xml(symbol: zbar_symbol_t; var buffer: PAnsiChar; var buflen: Cardinal): PAnsiChar;
+var
+  proc: function(symbol: zbar_symbol_t; var buffer: PAnsiChar; var buflen: Cardinal): PAnsiChar; cdecl;
+begin
+  GetAddressOf('zbar_symbol_xml', @proc);
+  Result := proc(symbol, buffer, buflen);
+end;
+
+function zbar_image_create: zbar_image_t;
+var
+  proc: function: zbar_image_t; cdecl;
+begin
+  GetAddressOf('zbar_image_create', @proc);
+  Result := proc;
+end;
+
+procedure zbar_image_destroy(image: zbar_image_t);
+var
+  proc: procedure(image: zbar_image_t); cdecl;
+begin
+  GetAddressOf('zbar_image_destroy', @proc);
+  proc(image);
+end;
+
+procedure zbar_image_ref(image: zbar_image_t; refs: Integer);
+var
+  proc: procedure(image: zbar_image_t; refs: Integer); cdecl;
+begin
+  GetAddressOf('zbar_image_ref', @proc);
+  proc(image, refs);
+end;
+
+function zbar_image_convert(image: zbar_image_t; format: PAnsiChar): zbar_image_t;
+var
+  proc: function(image: zbar_image_t; format: Cardinal): zbar_image_t; cdecl;
+var
+  val: Cardinal;
+begin
+  GetAddressOf('zbar_image_convert', @proc);
+  val    := PCardinal(format)^;
+  Result := proc(image, val);
+end;
+
+function zbar_image_convert_resize(image: zbar_image_t; format: PAnsiChar; width: Cardinal; height: Cardinal): zbar_image_t;
+var
+  proc: function(image: zbar_image_t; format: Cardinal; width: Cardinal; height: Cardinal): zbar_image_t; cdecl;
+var
+  val: Cardinal;
+begin
+  GetAddressOf('zbar_image_convert_resize', @proc);
+  val    := PCardinal(format)^;
+  Result := proc(image, val, width, height);
+end;
+
+function zbar_image_get_format(image: zbar_image_t): Cardinal;
+var
+  proc: function(image: zbar_image_t): Cardinal; cdecl;
+begin
+  GetAddressOf('zbar_image_get_format', @proc);
+  Result := proc(image);
+end;
+
+function zbar_image_get_sequence(image: zbar_image_t): Cardinal;
+var
+  proc: function(image: zbar_image_t): Cardinal; cdecl;
+begin
+  GetAddressOf('zbar_image_get_sequence', @proc);
+  Result := proc(image);
+end;
+
+function zbar_image_get_width(image: zbar_image_t): Cardinal;
+var
+  proc: function(image: zbar_image_t): Cardinal; cdecl;
+begin
+  GetAddressOf('zbar_image_get_width', @proc);
+  Result := proc(image);
+end;
+
+function zbar_image_get_height(image: zbar_image_t): Cardinal;
+var
+  proc: function(image: zbar_image_t): Cardinal; cdecl;
+begin
+  GetAddressOf('zbar_image_get_height', @proc);
+  Result := proc(image);
+end;
+
+function zbar_image_get_data(image: zbar_image_t): Pointer;
+var
+  proc: function(image: zbar_image_t): Pointer; cdecl;
+begin
+  GetAddressOf('zbar_image_get_data', @proc);
+  Result := proc(image);
+end;
+
+function zbar_image_get_data_length(img: zbar_image_t): Cardinal;
+var
+  proc: function(img: zbar_image_t): Cardinal; cdecl;
+begin
+  GetAddressOf('zbar_image_get_data_length', @proc);
+  Result := proc(img);
+end;
+
+function zbar_image_first_symbol(image: zbar_image_t): zbar_symbol_t;
+var
+  proc: function(image: zbar_image_t): zbar_symbol_t; cdecl;
+begin
+  GetAddressOf('zbar_image_first_symbol', @proc);
+  Result := proc(image);
+end;
+
+procedure zbar_image_set_format(image: zbar_image_t; format: PAnsiChar);
+var
+  proc: procedure(image: zbar_image_t; format: Cardinal); cdecl;
+var
+  val: Cardinal;
+begin
+  GetAddressOf('zbar_image_set_format', @proc);
+  val := PCardinal(format)^;
+  proc(image, val);
+end;
+
+procedure zbar_image_set_sequence(image: zbar_image_t; sequence_num: Cardinal);
+var
+  proc: procedure(image: zbar_image_t; sequence_num: Cardinal); cdecl;
+begin
+  GetAddressOf('zbar_image_set_sequence', @proc);
+  proc(image, sequence_num);
+end;
+
+procedure zbar_image_set_size(image: zbar_image_t; width: Cardinal; height: Cardinal);
+var
+  proc: procedure(image: zbar_image_t; width: Cardinal; height: Cardinal); cdecl;
+begin
+  GetAddressOf('zbar_image_set_size', @proc);
+  proc(image, width, height);
+end;
+
+procedure zbar_image_set_data(image: zbar_image_t; data: Pointer; data_byte_length: Cardinal;
+  cleanup_hndlr: zbar_image_cleanup_handler_t);
+var
+  proc: procedure(image: zbar_image_t; data: Pointer; data_byte_length: Cardinal;
+    cleanup_hndlr: zbar_image_cleanup_handler_t); cdecl;
+begin
+  GetAddressOf('zbar_image_set_data', @proc);
+  proc(image, data, data_byte_length, cleanup_hndlr);
+end;
+
+procedure zbar_image_free_data(image: zbar_image_t);
+var
+  proc: procedure(image: zbar_image_t); cdecl;
+begin
+  GetAddressOf('zbar_image_free_data', @proc);
+  proc(image);
+end;
+
+procedure zbar_image_set_userdata(image: zbar_image_t; userdata: Pointer);
+var
+  proc: procedure(image: zbar_image_t; userdata: Pointer); cdecl;
+begin
+  GetAddressOf('zbar_image_set_userdata', @proc);
+  proc(image, userdata);
+end;
+
+function zbar_image_get_userdata(image: zbar_image_t): Pointer;
+var
+  proc: function(image: zbar_image_t): Pointer; cdecl;
+begin
+  GetAddressOf('zbar_image_get_userdata', @proc);
+  Result := proc(image);
+end;
+
+function zbar_image_write(image: zbar_image_t; filebase: PAnsiChar): Integer;
+var
+  proc: function(image: zbar_image_t; filebase: PAnsiChar): Integer; cdecl;
+begin
+  GetAddressOf('zbar_image_write', @proc);
+  Result := proc(image, filebase);
+end;
+
+function zbar_image_read(filename: PAnsiChar): zbar_image_t;
+var
+  proc: function(filename: PAnsiChar): zbar_image_t; cdecl;
+begin
+  GetAddressOf('zbar_image_read', @proc);
+  Result := proc(filename);
+end;
+
+function zbar_processor_create(threaded: Integer): zbar_processor_t;
+var
+  proc: function(threaded: Integer): zbar_processor_t; cdecl;
+begin
+  GetAddressOf('zbar_processor_create', @proc);
+  Result := proc(threaded);
+end;
+
+procedure zbar_processor_destroy(processor: zbar_processor_t);
+var
+  proc: procedure(processor: zbar_processor_t); cdecl;
+begin
+  GetAddressOf('zbar_processor_destroy', @proc);
+  proc(processor);
+end;
+
+function zbar_processor_init(processor: zbar_processor_t; video_device: PAnsiChar; enable_display: Integer): Integer;
+var
+  proc: function(processor: zbar_processor_t; video_device: PAnsiChar; enable_display: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_init', @proc);
+  Result := proc(processor, video_device, enable_display);
+end;
+
+function zbar_processor_request_size(processor: zbar_processor_t; width: Cardinal; height: Cardinal): Integer;
+var
+  proc: function(processor: zbar_processor_t; width: Cardinal; height: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_request_size', @proc);
+  Result := proc(processor, width, height);
+end;
+
+function zbar_processor_request_interface(processor: zbar_processor_t; version: Integer): Integer;
+var
+  proc: function(processor: zbar_processor_t; version: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_request_interface', @proc);
+  Result := proc(processor, version);
+end;
+
+function zbar_processor_request_iomode(video: zbar_processor_t; iomode: Integer): Integer;
+var
+  proc: function(video: zbar_processor_t; iomode: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_request_iomode', @proc);
+  Result := proc(video, iomode);
+end;
+
+function zbar_processor_force_format(processor: zbar_processor_t; input_format: Cardinal;
+  output_format: Cardinal): Integer;
+var
+  proc: function(processor: zbar_processor_t; input_format: Cardinal; output_format: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_force_format', @proc);
+  Result := proc(processor, input_format, output_format);
+end;
+
+function zbar_processor_set_data_handler(processor: zbar_processor_t; handler: zbar_image_data_handler_t;
+  userdata: PAnsiChar): zbar_image_data_handler_t;
+var
+  proc: function(processor: zbar_processor_t; handler: zbar_image_data_handler_t; userdata: PAnsiChar)
+      : zbar_image_data_handler_t; cdecl;
+begin
+  GetAddressOf('zbar_processor_set_data_handler', @proc);
+  Result := proc(processor, handler, userdata);
+end;
+
+procedure zbar_processor_set_userdata(processor: zbar_processor_t; userdata: Pointer);
+var
+  proc: procedure(processor: zbar_processor_t; userdata: Pointer); cdecl;
+begin
+  GetAddressOf('zbar_processor_set_userdata', @proc);
+  proc(processor, userdata);
+end;
+
+function zbar_processor_get_userdata(processor: zbar_processor_t): Pointer;
+var
+  proc: function(processor: zbar_processor_t): Pointer; cdecl;
+begin
+  GetAddressOf('zbar_processor_get_userdata', @proc);
+  Result := proc(processor);
+end;
+
+function zbar_processor_set_config(processor: zbar_processor_t; symbology: zbar_symbol_type_t; config: zbar_config_t;
+  value: Integer): Integer;
+var
+  proc: function(processor: zbar_processor_t; symbology: zbar_symbol_type_t; config: zbar_config_t; value: Integer)
+      : Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_set_config', @proc);
+  Result := proc(processor, symbology, config, value);
+end;
+
+function zbar_processor_parse_config(processor: zbar_processor_t; config_string: PAnsiChar): Integer;
+var
+  sym: zbar_symbol_type_t;
+  cfg: zbar_config_t;
+  val: Integer;
+begin
+  Result := zbar_parse_config(config_string, sym, cfg, val) or zbar_processor_set_config(processor, sym, cfg, val);
+end;
+
+function zbar_processor_is_visible(processor: zbar_processor_t): Integer;
+var
+  proc: function(processor: zbar_processor_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_is_visible', @proc);
+  Result := proc(processor);
+end;
+
+function zbar_processor_set_visible(processor: zbar_processor_t; visible: Integer): Integer;
+var
+  proc: function(processor: zbar_processor_t; visible: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_set_visible', @proc);
+  Result := proc(processor, visible);
+end;
+
+function zbar_processor_set_active(processor: zbar_processor_t; active: Integer): Integer;
+var
+  proc: function(processor: zbar_processor_t; active: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_set_active', @proc);
+  Result := proc(processor, active);
+end;
+
+function zbar_processor_user_wait(processor: zbar_processor_t; timeout: Integer): Integer;
+var
+  proc: function(processor: zbar_processor_t; timeout: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_processor_user_wait', @proc);
+  Result := proc(processor, timeout);
+end;
+
+function zbar_process_one(processor: zbar_processor_t; timeout: Integer): Integer;
+var
+  proc: function(processor: zbar_processor_t; timeout: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_process_one', @proc);
+  Result := proc(processor, timeout);
+end;
+
+function zbar_process_image(processor: zbar_processor_t; image: zbar_image_t): Integer;
+var
+  proc: function(processor: zbar_processor_t; image: zbar_image_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_process_image', @proc);
+  Result := proc(processor, image);
+end;
+
+function zbar_processor_error_spew(processor: zbar_processor_t; verbosity: Integer): Integer;
+begin
+  Result := _zbar_error_spew(processor, verbosity);
+end;
+
+function zbar_processor_error_string(processor: zbar_processor_t; verbosity: Integer): PAnsiChar;
+begin
+  Result := _zbar_error_string(processor, verbosity);
+end;
+
+function zbar_processor_get_error_code(processor: zbar_processor_t): zbar_error_t;
+begin
+  Result := _zbar_get_error_code(processor);
+end;
+
+function zbar_video_create: zbar_video_t;
+var
+  proc: function: zbar_video_t; cdecl;
+begin
+  GetAddressOf('zbar_video_create', @proc);
+  Result := proc;
+end;
+
+procedure zbar_video_destroy(video: zbar_video_t);
+var
+  proc: procedure(video: zbar_video_t); cdecl;
+begin
+  GetAddressOf('zbar_video_destroy', @proc);
+  proc(video);
+end;
+
+function zbar_video_open(video: zbar_video_t; device: PAnsiChar): Integer;
+var
+  proc: function(video: zbar_video_t; device: PAnsiChar): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_open', @proc);
+  Result := proc(video, device);
+end;
+
+function zbar_video_get_fd(video: zbar_video_t): Integer;
+var
+  proc: function(video: zbar_video_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_get_fd', @proc);
+  Result := proc(video);
+end;
+
+function zbar_video_request_size(video: zbar_video_t; width: Cardinal; height: Cardinal): Integer;
+var
+  proc: function(video: zbar_video_t; width: Cardinal; height: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_request_size', @proc);
+  Result := proc(video, width, height);
+end;
+
+function zbar_video_request_interface(video: zbar_video_t; version: Integer): Integer;
+var
+  proc: function(video: zbar_video_t; version: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_request_interface', @proc);
+  Result := proc(video, version);
+end;
+
+function zbar_video_request_iomode(video: zbar_video_t; iomode: Integer): Integer;
+var
+  proc: function(video: zbar_video_t; iomode: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_request_iomode', @proc);
+  Result := proc(video, iomode);
+end;
+
+function zbar_video_get_width(video: zbar_video_t): Integer;
+var
+  proc: function(video: zbar_video_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_get_width', @proc);
+  Result := proc(video);
+end;
+
+function zbar_video_get_height(video: zbar_video_t): Integer;
+var
+  proc: function(video: zbar_video_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_get_height', @proc);
+  Result := proc(video);
+end;
+
+function zbar_video_init(video: zbar_video_t; format: Cardinal): Integer;
+var
+  proc: function(video: zbar_video_t; format: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_init', @proc);
+  Result := proc(video, format);
+end;
+
+function zbar_video_enable(video: zbar_video_t; enable: Integer): Integer;
+var
+  proc: function(video: zbar_video_t; enable: Integer): Integer; cdecl;
+begin
+  GetAddressOf('zbar_video_enable', @proc);
+  Result := proc(video, enable);
+end;
+
+function zbar_video_next_image(video: zbar_video_t): zbar_image_t;
+var
+  proc: function(video: zbar_video_t): zbar_image_t; cdecl;
+begin
+  GetAddressOf('zbar_video_next_image', @proc);
+  Result := proc(video);
+end;
+
+function zbar_video_error_spew(video: zbar_video_t; verbosity: Integer): Integer;
+begin
+  Result := _zbar_error_spew(video, verbosity);
+end;
+
+function zbar_video_error_string(video: zbar_video_t; verbosity: Integer): PAnsiChar;
+begin
+  Result := _zbar_error_string(video, verbosity);
+end;
+
+function zbar_video_get_error_code(video: zbar_video_t): zbar_error_t;
+begin
+  Result := _zbar_get_error_code(video);
+end;
+
+function zbar_window_create: zbar_window_t;
+var
+  proc: function: zbar_window_t; cdecl;
+begin
+  GetAddressOf('zbar_window_create', @proc);
+  Result := proc;
+end;
+
+procedure zbar_window_destroy(window: zbar_window_t);
+var
+  proc: procedure(window: zbar_window_t); cdecl;
+begin
+  GetAddressOf('zbar_window_destroy', @proc);
+  proc(window);
+end;
+
+function zbar_window_attach(window: zbar_window_t; x11_display_w32_hwnd: Pointer; x11_drawable: Cardinal): Integer;
+var
+  proc: function(window: zbar_window_t; x11_display_w32_hwnd: Pointer; x11_drawable: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_window_attach', @proc);
+  Result := proc(window, x11_display_w32_hwnd, x11_drawable);
+end;
+
+procedure zbar_window_set_overlay(window: zbar_window_t; level: Integer);
+var
+  proc: procedure(window: zbar_window_t; level: Integer); cdecl;
+begin
+  GetAddressOf('zbar_window_set_overlay', @proc);
+  proc(window, level);
+end;
+
+function zbar_window_draw(window: zbar_window_t; image: zbar_image_t): Integer;
+var
+  proc: function(window: zbar_window_t; image: zbar_image_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_window_draw', @proc);
+  Result := proc(window, image);
+end;
+
+function zbar_window_redraw(window: zbar_window_t): Integer;
+var
+  proc: function(window: zbar_window_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_window_redraw', @proc);
+  Result := proc(window);
+end;
+
+function zbar_window_resize(window: zbar_window_t; width: Cardinal; height: Cardinal): Integer;
+var
+  proc: function(window: zbar_window_t; width: Cardinal; height: Cardinal): Integer; cdecl;
+begin
+  GetAddressOf('zbar_window_resize', @proc);
+  Result := proc(window, width, height);
+end;
+
+function zbar_window_error_spew(window: zbar_window_t; verbosity: Integer): Integer;
+begin
+  Result := _zbar_error_spew(window, verbosity);
+end;
+
+function zbar_window_error_string(window: zbar_window_t; verbosity: Integer): PAnsiChar;
+begin
+  Result := _zbar_error_string(window, verbosity);
+end;
+
+function zbar_window_get_error_code(window: zbar_window_t): zbar_error_t;
+begin
+  Result := _zbar_get_error_code(window);
+end;
+
+function zbar_negotiate_format(video: zbar_video_t; window: zbar_window_t): Integer;
+var
+  proc: function(video: zbar_video_t; window: zbar_window_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_negotiate_format', @proc);
+  Result := proc(video, window);
+end;
+
+function zbar_image_scanner_create: zbar_image_scanner_t;
+var
+  proc: function: zbar_image_scanner_t; cdecl;
+begin
+  GetAddressOf('zbar_image_scanner_create', @proc);
+  Result := proc;
+end;
+
+procedure zbar_image_scanner_destroy(scanner: zbar_image_scanner_t);
+var
+  proc: procedure(scanner: zbar_image_scanner_t); cdecl;
+begin
+  GetAddressOf('zbar_image_scanner_destroy', @proc);
+  proc(scanner);
+end;
+
+function zbar_image_scanner_set_data_handler(scanner: zbar_image_scanner_t; handler: zbar_image_data_handler_t;
+  userdata: Pointer): zbar_image_data_handler_t;
+var
+  proc: function(scanner: zbar_image_scanner_t; handler: zbar_image_data_handler_t; userdata: Pointer)
+      : zbar_image_data_handler_t; cdecl;
+begin
+  GetAddressOf('zbar_image_scanner_set_data_handler', @proc);
+  Result := proc(scanner, handler, userdata);
+end;
+
+function zbar_image_scanner_set_config(scanner: zbar_image_scanner_t; symbology: zbar_symbol_type_t;
+  config: zbar_config_t; value: Integer): Integer;
+var
+  proc: function(scanner: zbar_image_scanner_t; symbology: zbar_symbol_type_t; config: zbar_config_t; value: Integer)
+      : Integer; cdecl;
+begin
+  GetAddressOf('zbar_image_scanner_set_config', @proc);
+  Result := proc(scanner, symbology, config, value);
+end;
+
+function zbar_image_scanner_parse_config(scanner: zbar_image_scanner_t; config_string: PAnsiChar): Integer;
+var
+  sym: zbar_symbol_type_t;
+  cfg: zbar_config_t;
+  val: Integer;
+begin
+  Result := zbar_parse_config(config_string, &sym, &cfg, &val) or zbar_image_scanner_set_config(scanner, sym, cfg, val);
+end;
+
+procedure zbar_image_scanner_enable_cache(scanner: zbar_image_scanner_t; enable: Integer);
+var
+  proc: procedure(scanner: zbar_image_scanner_t; enable: Integer); cdecl;
+begin
+  GetAddressOf('zbar_image_scanner_enable_cache', @proc);
+  proc(scanner, enable);
+end;
+
+function zbar_scan_image(scanner: zbar_image_scanner_t; image: zbar_image_t): Integer;
+var
+  proc: function(scanner: zbar_image_scanner_t; image: zbar_image_t): Integer; cdecl;
+begin
+  GetAddressOf('zbar_scan_image', @proc);
+  Result := proc(scanner, image);
+end;
+
+function zbar_decoder_create: zbar_decoder_t;
+var
+  proc: function: zbar_decoder_t; cdecl;
+begin
+  GetAddressOf('zbar_decoder_create', @proc);
+  Result := proc;
+end;
+
+procedure zbar_decoder_destroy(decoder: zbar_decoder_t);
+var
+  proc: procedure(decoder: zbar_decoder_t); cdecl;
+begin
+  GetAddressOf('zbar_decoder_destroy', @proc);
+  proc(decoder);
+end;
+
+function zbar_decoder_set_config(decoder: zbar_decoder_t; symbology: zbar_symbol_type_t; config: zbar_config_t;
+  value: Integer): Integer;
+var
+  proc: function(decoder: zbar_decoder_t; symbology: zbar_symbol_type_t; config: zbar_config_t; value: Integer)
+      : Integer; cdecl;
+begin
+  GetAddressOf('zbar_decoder_set_config', @proc);
+  Result := proc(decoder, symbology, config, value);
+end;
+
+function zbar_decoder_parse_config(decoder: zbar_decoder_t; config_string: PAnsiChar): Integer;
+var
+  sym: zbar_symbol_type_t;
+  cfg: zbar_config_t;
+  val: Integer;
+begin
+  Result := zbar_parse_config(config_string, &sym, &cfg, &val) or zbar_decoder_set_config(decoder, sym, cfg, val);
+end;
+
+procedure zbar_decoder_reset(decoder: zbar_decoder_t);
+var
+  proc: procedure(decoder: zbar_decoder_t); cdecl;
+begin
+  GetAddressOf('zbar_decoder_reset', @proc);
+  proc(decoder);
+end;
+
+procedure zbar_decoder_new_scan(decoder: zbar_decoder_t);
+var
+  proc: procedure(decoder: zbar_decoder_t); cdecl;
+begin
+  GetAddressOf('zbar_decoder_new_scan', @proc);
+  proc(decoder);
+end;
+
+function zbar_decode_width(decoder: zbar_decoder_t; width: Cardinal): zbar_symbol_type_t;
+var
+  proc: function(decoder: zbar_decoder_t; width: Cardinal): zbar_symbol_type_t; cdecl;
+begin
+  GetAddressOf('zbar_decode_width', @proc);
+  Result := proc(decoder, width);
+end;
+
+function zbar_decoder_get_color(decoder: zbar_decoder_t): zbar_color_t;
+var
+  proc: function(decoder: zbar_decoder_t): zbar_color_t; cdecl;
+begin
+  GetAddressOf('zbar_decoder_get_color', @proc);
+  Result := proc(decoder);
+end;
+
+function zbar_decoder_get_data(decoder: zbar_decoder_t): PAnsiChar;
+var
+  proc: function(decoder: zbar_decoder_t): PAnsiChar; cdecl;
+begin
+  GetAddressOf('zbar_decoder_get_data', @proc);
+  Result := proc(decoder);
+end;
+
+function zbar_decoder_get_type(decoder: zbar_decoder_t): zbar_symbol_type_t;
+var
+  proc: function(decoder: zbar_decoder_t): zbar_symbol_type_t; cdecl;
+begin
+  GetAddressOf('zbar_decoder_get_type', @proc);
+  Result := proc(decoder);
+end;
+
+function zbar_decoder_set_handler(decoder: zbar_decoder_t; handler: zbar_decoder_handler_t): zbar_decoder_handler_t;
+var
+  proc: function(decoder: zbar_decoder_t; handler: zbar_decoder_handler_t): zbar_decoder_handler_t; cdecl;
+begin
+  GetAddressOf('zbar_decoder_set_handler', @proc);
+  Result := proc(decoder, handler);
+end;
+
+procedure zbar_decoder_set_userdata(decoder: zbar_decoder_t; userdata: Pointer);
+var
+  proc: procedure(decoder: zbar_decoder_t; userdata: Pointer); cdecl;
+begin
+  GetAddressOf('zbar_decoder_set_userdata', @proc);
+  proc(decoder, userdata);
+end;
+
+function zbar_decoder_get_userdata(decoder: zbar_decoder_t): Pointer;
+var
+  proc: function(decoder: zbar_decoder_t): Pointer; cdecl;
+begin
+  GetAddressOf('zbar_decoder_get_userdata', @proc);
+  Result := proc(decoder);
+end;
+
+function zbar_scanner_create(decoder: zbar_decoder_t): zbar_scanner_t;
+var
+  proc: function(decoder: zbar_decoder_t): zbar_scanner_t; cdecl;
+begin
+  GetAddressOf('zbar_scanner_create', @proc);
+  Result := proc(decoder);
+end;
+
+procedure zbar_scanner_destroy(scanner: zbar_scanner_t);
+var
+  proc: procedure(scanner: zbar_scanner_t); cdecl;
+begin
+  GetAddressOf('zbar_scanner_destroy', @proc);
+  proc(scanner);
+end;
+
+function zbar_scanner_reset(scanner: zbar_scanner_t): zbar_symbol_type_t;
+var
+  proc: function(scanner: zbar_scanner_t): zbar_symbol_type_t; cdecl;
+begin
+  GetAddressOf('zbar_scanner_reset', @proc);
+  Result := proc(scanner);
+end;
+
+function zbar_scanner_new_scan(scanner: zbar_scanner_t): zbar_symbol_type_t;
+var
+  proc: function(scanner: zbar_scanner_t): zbar_symbol_type_t; cdecl;
+begin
+  GetAddressOf('zbar_scanner_new_scan', @proc);
+  Result := proc(scanner);
+end;
+
+function zbar_scan_y(scanner: zbar_scanner_t; y: Integer): zbar_symbol_type_t;
+var
+  proc: function(scanner: zbar_scanner_t; y: Integer): zbar_symbol_type_t; cdecl;
+begin
+  GetAddressOf('zbar_scan_y', @proc);
+  Result := proc(scanner, y);
+end;
+
+function zbar_scan_rgb24(scanner: zbar_scanner_t; rgb: PAnsiChar): zbar_symbol_type_t;
+begin
+  Result := zbar_scan_y(scanner, Ord(rgb^) + Ord((rgb + 1)^) + Ord((rgb + 2)^));
+end;
+
+function zbar_scanner_get_width(scanner: zbar_scanner_t): Cardinal;
+var
+  proc: function(scanner: zbar_scanner_t): Cardinal; cdecl;
+begin
+  GetAddressOf('zbar_scanner_get_width', @proc);
+  Result := proc(scanner);
+end;
+
+function zbar_scanner_get_color(scanner: zbar_scanner_t): zbar_color_t;
+var
+  proc: function(scanner: zbar_scanner_t): zbar_color_t; cdecl;
+begin
+  GetAddressOf('zbar_scanner_get_color', @proc);
+  Result := proc(scanner);
+end;
+
+
+
+initialization
+
+  DllHandle := LoadLibrary('libzbar-0.dll');
+//  if DllHandle = 0 then
+    //RaiseLastOSError;
+
+finalization
+
+  if (DllHandle <> 0) then
+    FreeLibrary(DllHandle);
+
+end.

BIN
libMagickCore-2.dll


BIN
libiconv-2.dll


BIN
libjpeg-7.dll


BIN
libpng12-0.dll


BIN
libtiff-3.dll


BIN
libxml2-2.dll


BIN
libzbar-0.dll


BIN
qr-code.png


+ 195 - 0
src/ZBar01.bdsproj

@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+	<PersonalityInfo>
+		<Option>
+			<Option Name="Personality">Delphi.Personality</Option>
+			<Option Name="ProjectType"></Option>
+			<Option Name="Version">1.0</Option>
+			<Option Name="GUID">{FF053766-B590-4477-9DFA-FB158A04450A}</Option>
+		</Option>
+	</PersonalityInfo>
+	<Delphi.Personality>
+		<Source>
+			<Source Name="MainSource">ZBar01.dpr</Source>
+		</Source>
+		<FileVersion>
+			<FileVersion Name="Version">7.0</FileVersion>
+		</FileVersion>
+		<Compiler>
+			<Compiler Name="A">8</Compiler>
+			<Compiler Name="B">0</Compiler>
+			<Compiler Name="C">1</Compiler>
+			<Compiler Name="D">1</Compiler>
+			<Compiler Name="E">0</Compiler>
+			<Compiler Name="F">0</Compiler>
+			<Compiler Name="G">1</Compiler>
+			<Compiler Name="H">1</Compiler>
+			<Compiler Name="I">1</Compiler>
+			<Compiler Name="J">0</Compiler>
+			<Compiler Name="K">0</Compiler>
+			<Compiler Name="L">1</Compiler>
+			<Compiler Name="M">0</Compiler>
+			<Compiler Name="N">1</Compiler>
+			<Compiler Name="O">1</Compiler>
+			<Compiler Name="P">1</Compiler>
+			<Compiler Name="Q">0</Compiler>
+			<Compiler Name="R">0</Compiler>
+			<Compiler Name="S">0</Compiler>
+			<Compiler Name="T">0</Compiler>
+			<Compiler Name="U">0</Compiler>
+			<Compiler Name="V">1</Compiler>
+			<Compiler Name="W">0</Compiler>
+			<Compiler Name="X">1</Compiler>
+			<Compiler Name="Y">1</Compiler>
+			<Compiler Name="Z">1</Compiler>
+			<Compiler Name="ShowHints">True</Compiler>
+			<Compiler Name="ShowWarnings">True</Compiler>
+			<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
+			<Compiler Name="NamespacePrefix"></Compiler>
+			<Compiler Name="GenerateDocumentation">False</Compiler>
+			<Compiler Name="DefaultNamespace"></Compiler>
+			<Compiler Name="SymbolDeprecated">True</Compiler>
+			<Compiler Name="SymbolLibrary">True</Compiler>
+			<Compiler Name="SymbolPlatform">True</Compiler>
+			<Compiler Name="SymbolExperimental">True</Compiler>
+			<Compiler Name="UnitLibrary">True</Compiler>
+			<Compiler Name="UnitPlatform">True</Compiler>
+			<Compiler Name="UnitDeprecated">True</Compiler>
+			<Compiler Name="UnitExperimental">True</Compiler>
+			<Compiler Name="HResultCompat">True</Compiler>
+			<Compiler Name="HidingMember">True</Compiler>
+			<Compiler Name="HiddenVirtual">True</Compiler>
+			<Compiler Name="Garbage">True</Compiler>
+			<Compiler Name="BoundsError">True</Compiler>
+			<Compiler Name="ZeroNilCompat">True</Compiler>
+			<Compiler Name="StringConstTruncated">True</Compiler>
+			<Compiler Name="ForLoopVarVarPar">True</Compiler>
+			<Compiler Name="TypedConstVarPar">True</Compiler>
+			<Compiler Name="AsgToTypedConst">True</Compiler>
+			<Compiler Name="CaseLabelRange">True</Compiler>
+			<Compiler Name="ForVariable">True</Compiler>
+			<Compiler Name="ConstructingAbstract">True</Compiler>
+			<Compiler Name="ComparisonFalse">True</Compiler>
+			<Compiler Name="ComparisonTrue">True</Compiler>
+			<Compiler Name="ComparingSignedUnsigned">True</Compiler>
+			<Compiler Name="CombiningSignedUnsigned">True</Compiler>
+			<Compiler Name="UnsupportedConstruct">True</Compiler>
+			<Compiler Name="FileOpen">True</Compiler>
+			<Compiler Name="FileOpenUnitSrc">True</Compiler>
+			<Compiler Name="BadGlobalSymbol">True</Compiler>
+			<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
+			<Compiler Name="InvalidDirective">True</Compiler>
+			<Compiler Name="PackageNoLink">True</Compiler>
+			<Compiler Name="PackageThreadVar">True</Compiler>
+			<Compiler Name="ImplicitImport">True</Compiler>
+			<Compiler Name="HPPEMITIgnored">True</Compiler>
+			<Compiler Name="NoRetVal">True</Compiler>
+			<Compiler Name="UseBeforeDef">True</Compiler>
+			<Compiler Name="ForLoopVarUndef">True</Compiler>
+			<Compiler Name="UnitNameMismatch">True</Compiler>
+			<Compiler Name="NoCFGFileFound">True</Compiler>
+			<Compiler Name="ImplicitVariants">True</Compiler>
+			<Compiler Name="UnicodeToLocale">True</Compiler>
+			<Compiler Name="LocaleToUnicode">True</Compiler>
+			<Compiler Name="ImagebaseMultiple">True</Compiler>
+			<Compiler Name="SuspiciousTypecast">True</Compiler>
+			<Compiler Name="PrivatePropAccessor">True</Compiler>
+			<Compiler Name="UnsafeType">False</Compiler>
+			<Compiler Name="UnsafeCode">False</Compiler>
+			<Compiler Name="UnsafeCast">False</Compiler>
+			<Compiler Name="OptionTruncated">True</Compiler>
+			<Compiler Name="WideCharReduced">True</Compiler>
+			<Compiler Name="DuplicatesIgnored">True</Compiler>
+			<Compiler Name="UnitInitSeq">True</Compiler>
+			<Compiler Name="LocalPInvoke">True</Compiler>
+			<Compiler Name="MessageDirective">True</Compiler>
+			<Compiler Name="TypeInfoImplicitlyAdded">True</Compiler>
+			<Compiler Name="XMLWhitespaceNotAllowed">True</Compiler>
+			<Compiler Name="XMLUnknownEntity">True</Compiler>
+			<Compiler Name="XMLInvalidNameStart">True</Compiler>
+			<Compiler Name="XMLInvalidName">True</Compiler>
+			<Compiler Name="XMLExpectedCharacter">True</Compiler>
+			<Compiler Name="XMLCRefNoResolve">True</Compiler>
+			<Compiler Name="XMLNoParm">True</Compiler>
+			<Compiler Name="XMLNoMatchingParm">True</Compiler>
+			<Compiler Name="CodePage"></Compiler>
+		</Compiler>
+		<Linker>
+			<Linker Name="MapFile">0</Linker>
+			<Linker Name="OutputObjs">0</Linker>
+			<Linker Name="GenerateHpps">False</Linker>
+			<Linker Name="ConsoleApp">1</Linker>
+			<Linker Name="DebugInfo">False</Linker>
+			<Linker Name="RemoteSymbols">False</Linker>
+			<Linker Name="GenerateDRC">False</Linker>
+			<Linker Name="MinStackSize">16384</Linker>
+			<Linker Name="MaxStackSize">1048576</Linker>
+			<Linker Name="ImageBase">4194304</Linker>
+			<Linker Name="ExeDescription"></Linker>
+		</Linker>
+		<Directories>
+			<Directories Name="OutputDir">..\</Directories>
+			<Directories Name="UnitOutputDir">dcu</Directories>
+			<Directories Name="PackageDLLOutputDir"></Directories>
+			<Directories Name="PackageDCPOutputDir"></Directories>
+			<Directories Name="SearchPath">..\lib</Directories>
+			<Directories Name="Packages"></Directories>
+			<Directories Name="Conditionals"></Directories>
+			<Directories Name="DebugSourceDirs"></Directories>
+			<Directories Name="UsePackages">False</Directories>
+		</Directories>
+		<Parameters>
+			<Parameters Name="RunParams"></Parameters>
+			<Parameters Name="HostApplication"></Parameters>
+			<Parameters Name="Launcher"></Parameters>
+			<Parameters Name="UseLauncher">False</Parameters>
+			<Parameters Name="DebugCWD"></Parameters>
+			<Parameters Name="Debug Symbols Search Path"></Parameters>
+			<Parameters Name="LoadAllSymbols">True</Parameters>
+			<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
+		</Parameters>
+		<Signing>
+			<Signing Name="SignAssembly">False</Signing>
+		</Signing>
+		<VersionInfo>
+			<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
+			<VersionInfo Name="AutoIncBuild">False</VersionInfo>
+			<VersionInfo Name="MajorVer">1</VersionInfo>
+			<VersionInfo Name="MinorVer">0</VersionInfo>
+			<VersionInfo Name="Release">0</VersionInfo>
+			<VersionInfo Name="Build">0</VersionInfo>
+			<VersionInfo Name="Debug">False</VersionInfo>
+			<VersionInfo Name="PreRelease">False</VersionInfo>
+			<VersionInfo Name="Special">False</VersionInfo>
+			<VersionInfo Name="Private">False</VersionInfo>
+			<VersionInfo Name="DLL">False</VersionInfo>
+			<VersionInfo Name="Locale">1028</VersionInfo>
+			<VersionInfo Name="CodePage">950</VersionInfo>
+		</VersionInfo>
+		<VersionInfoKeys>
+			<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
+			<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
+			<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
+			<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
+			<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
+			<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
+			<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
+			<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
+			<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+			<VersionInfoKeys Name="Comments"></VersionInfoKeys>
+		</VersionInfoKeys>
+		<Excluded_Packages>
+      
+      
+      
+      
+      
+      
+      
+      
+      <Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+      <Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+    </Excluded_Packages>
+		<buildevents/>
+	</Delphi.Personality>
+</BorlandProject>

+ 11 - 0
src/ZBar01.bdsproj.local

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+	<Transactions>
+    <Transaction>2017/12/24 13:26:16.606.pas,C:\Users\kuei\Documents\RAD Studio\Projects\Unit1.pas=D:\_Projects.pi\ZBar01\fMain.pas</Transaction>
+    <Transaction>2017/12/24 13:26:16.606.dfm,C:\Users\kuei\Documents\RAD Studio\Projects\Unit1.dfm=D:\_Projects.pi\ZBar01\fMain.dfm</Transaction>
+    <Transaction>2017/12/24 13:26:27.123.bdsproj,C:\Users\kuei\Documents\RAD Studio\Projects\Project1.bdsproj=D:\_Projects.pi\ZBar01\ZBar01.bdsproj</Transaction>
+    <Transaction>2017/12/24 13:45:10.786.pas,D:\_Projects.pi\ZBar01\D2007\fMain.pas=D:\_Projects.pi\ZBar01\D2007\src\fMain.pas</Transaction>
+    <Transaction>2017/12/24 13:45:10.786.dfm,D:\_Projects.pi\ZBar01\D2007\fMain.dfm=D:\_Projects.pi\ZBar01\D2007\src\fMain.dfm</Transaction>
+    <Transaction>2017/12/24 13:46:24.988.bdsproj,D:\_Projects.pi\ZBar01\D2007\ZBar01.bdsproj=D:\_Projects.pi\ZBar01\D2007\src\ZBar01.bdsproj</Transaction>
+  </Transactions>
+</BorlandProject>

+ 41 - 0
src/ZBar01.cfg

@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\"
+-N0"dcu"
+-LE"C:\Users\Public\Documents\RAD Studio\5.0\Bpl"
+-LN"C:\Users\Public\Documents\RAD Studio\5.0\Dcp"
+-U"..\lib"
+-O"..\lib"
+-I"..\lib"
+-R"..\lib"

+ 17 - 0
src/ZBar01.dpr

@@ -0,0 +1,17 @@
+program ZBar01;
+
+uses
+  Forms,
+  fMain in 'fMain.pas' {FormZBar},
+  ZBar in '..\lib\ZBar.pas',
+  magick_wand in '..\lib\ImageMagick\wand\magick_wand.pas',
+  ImageMagick in '..\lib\ImageMagick\magick\ImageMagick.pas';
+
+{$R *.res}
+
+begin
+  Application.Initialize;
+  Application.MainFormOnTaskbar := True;
+  Application.CreateForm(TFormZBar, FormZBar);
+  Application.Run;
+end.

+ 142 - 0
src/ZBar01.dproj

@@ -0,0 +1,142 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <PropertyGroup>
+        <ProjectGuid>{FF053766-B590-4477-9DFA-FB158A04450A}</ProjectGuid>
+        <MainSource>ZBar01.dpr</MainSource>
+        <Base>True</Base>
+        <Config Condition="'$(Config)'==''">Debug</Config>
+        <TargetedPlatforms>1025</TargetedPlatforms>
+        <AppType>Application</AppType>
+        <FrameworkType>VCL</FrameworkType>
+        <ProjectVersion>18.1</ProjectVersion>
+        <Platform Condition="'$(Platform)'==''">Win32</Platform>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
+        <Base_Win32>true</Base_Win32>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
+        <Base_Win64>true</Base_Win64>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
+        <Cfg_1>true</Cfg_1>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
+        <Cfg_1_Win32>true</Cfg_1_Win32>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
+        <Cfg_2>true</Cfg_2>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
+        <Cfg_2_Win32>true</Cfg_2_Win32>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Base)'!=''">
+        <DCC_DebugInformation>1</DCC_DebugInformation>
+        <DCC_ExeOutput>..\</DCC_ExeOutput>
+        <DCC_DcuOutput>dcu</DCC_DcuOutput>
+        <SanitizedProjectName>ZBar01</SanitizedProjectName>
+        <VerInfo_Locale>1028</VerInfo_Locale>
+        <DCC_N>true</DCC_N>
+        <DCC_S>false</DCC_S>
+        <DCC_UnitSearchPath>..\lib;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
+        <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <DCC_E>false</DCC_E>
+        <DCC_F>false</DCC_F>
+        <DCC_K>false</DCC_K>
+        <DCC_SymbolReferenceInfo>1</DCC_SymbolReferenceInfo>
+        <DCC_ImageBase>00400000</DCC_ImageBase>
+        <DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win32)'!=''">
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Icon_MainIcon>ZBar01_Icon.ico</Icon_MainIcon>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64)'!=''">
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+        <Icon_MainIcon>ZBar01_Icon.ico</Icon_MainIcon>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1)'!=''">
+        <DCC_DebugInformation>0</DCC_DebugInformation>
+        <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+        <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+        <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <AppEnableHighDPI>true</AppEnableHighDPI>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2)'!=''">
+        <DCC_Optimize>false</DCC_Optimize>
+        <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+        <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <AppEnableHighDPI>true</AppEnableHighDPI>
+    </PropertyGroup>
+    <ItemGroup>
+        <DelphiCompile Include="$(MainSource)">
+            <MainSource>MainSource</MainSource>
+        </DelphiCompile>
+        <DCCReference Include="fMain.pas">
+            <Form>FormZBar</Form>
+        </DCCReference>
+        <DCCReference Include="..\lib\ZBar.pas"/>
+        <DCCReference Include="..\lib\ImageMagick\wand\magick_wand.pas"/>
+        <DCCReference Include="..\lib\ImageMagick\magick\ImageMagick.pas"/>
+        <BuildConfiguration Include="Debug">
+            <Key>Cfg_2</Key>
+            <CfgParent>Base</CfgParent>
+        </BuildConfiguration>
+        <BuildConfiguration Include="Base">
+            <Key>Base</Key>
+        </BuildConfiguration>
+        <BuildConfiguration Include="Release">
+            <Key>Cfg_1</Key>
+            <CfgParent>Base</CfgParent>
+        </BuildConfiguration>
+    </ItemGroup>
+    <ProjectExtensions>
+        <Borland.Personality>Delphi.Personality.12</Borland.Personality>
+        <Borland.ProjectType/>
+        <BorlandProject>
+            <Delphi.Personality>
+                <Source>
+                    <Source Name="MainSource">ZBar01.dpr</Source>
+                </Source>
+                <Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+                </Excluded_Packages>
+            </Delphi.Personality>
+            <Platforms>
+                <Platform value="iOSDevice64">True</Platform>
+                <Platform value="Win32">True</Platform>
+                <Platform value="Win64">False</Platform>
+            </Platforms>
+        </BorlandProject>
+        <ProjectFileVersion>12</ProjectFileVersion>
+    </ProjectExtensions>
+    <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
+    <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
+</Project>

+ 11 - 0
src/ZBar01.dproj.local

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+	<Transactions>
+    <Transaction>1899-12-30 00:00:00.000.pas,C:\Users\kuei\Documents\RAD Studio\Projects\Unit1.pas=D:\_Projects.pi\ZBar01\fMain.pas</Transaction>
+    <Transaction>1899-12-30 00:00:00.000.dfm,D:\_Projects.pi\ZBar01\D2007\fMain.dfm=D:\_Projects.pi\ZBar01\D2007\src\fMain.dfm</Transaction>
+    <Transaction>1899-12-30 00:00:00.000.pas,D:\_Projects.pi\ZBar01\D2007\fMain.pas=D:\_Projects.pi\ZBar01\D2007\src\fMain.pas</Transaction>
+    <Transaction>1899-12-30 00:00:00.000.bdsproj,D:\_Projects.pi\ZBar01\D2007\ZBar01.bdsproj=D:\_Projects.pi\ZBar01\D2007\src\ZBar01.bdsproj</Transaction>
+    <Transaction>1899-12-30 00:00:00.000.bdsproj,C:\Users\kuei\Documents\RAD Studio\Projects\Project1.bdsproj=D:\_Projects.pi\ZBar01\ZBar01.bdsproj</Transaction>
+    <Transaction>1899-12-30 00:00:00.000.dfm,C:\Users\kuei\Documents\RAD Studio\Projects\Unit1.dfm=D:\_Projects.pi\ZBar01\fMain.dfm</Transaction>
+  </Transactions>
+</BorlandProject>

+ 654 - 0
src/ZBar01.dsk

@@ -0,0 +1,654 @@
+[Closed Files]
+File_0=TSourceModule,'D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\wand\magick_image.inc',0,1,393,1,403,0,0,,
+File_1=TSourceModule,'D:\vcl\RealThinClient SDK\Examples\App_Server\AppServer_Module.pas',0,1,54,24,65,0,0,,
+File_2=TSourceModule,'D:\vcl\RealThinClient SDK\Examples\App_Client\AppClient_Unit.pas',0,1,4,41,17,0,0,,
+File_3=TSourceModule,'D:\vcl\RealThinClient SDK\Examples\App_Server\Server_Form.pas',0,1,1,1,1,0,0,,
+File_4=TSourceModule,'D:\vcl\RealThinClient SDK\Examples\Raw_HttpServer\WinHttpSrvTest.pas',0,1,1,1,1,0,0,,
+File_5=TSourceModule,'D:\vcl\RealThinClient SDK\Examples\WebStress_Client\WebStressTool_Unit.pas',0,1,1,1,1,0,0,,
+File_6=TSourceModule,'D:\vcl\RealThinClient SDK\Examples\WebServer_LogReader\Unit1.pas',0,1,1,1,1,0,0,,
+File_7=TSourceModule,'D:\_¾ð²ù¬£(raspberry pi)\Barcode\Zbar\Project\lib\ZBar.pas',0,1,1362,1,1375,0,0,,
+File_8=TSourceModule,'D:\Uniflex\JobIN_JobOUT\src\uDModule.pas',0,1,5323,33,5329,0,0,,{2
+File_9=TSourceModule,'D:\Uniflex\JobIN_JobOUT\src\uOnVerify.pas',0,1,301,52,319,0,0,,{7
+
+[Modules]
+Module0=D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\magick\ImageMagick.pas
+Module1=D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\wand\magick_wand.pas
+Module2=D:\_Projects.pi\ZBar01\D2007\src\fMain.pas
+Module3=D:\_Projects.pi\ZBar01\D2007\lib\ZBar.pas
+Count=4
+EditWindowCount=1
+
+[D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\magick\ImageMagick.pas]
+ModuleType=TSourceModule
+FormState=0
+FormOnTop=0
+
+[D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\wand\magick_wand.pas]
+ModuleType=TSourceModule
+FormState=0
+FormOnTop=0
+
+[D:\_Projects.pi\ZBar01\D2007\src\fMain.pas]
+ModuleType=TSourceModule
+FormState=1
+FormOnTop=0
+
+[D:\_Projects.pi\ZBar01\D2007\lib\ZBar.pas]
+ModuleType=TSourceModule
+FormState=0
+FormOnTop=0
+
+[EditWindow0]
+ViewCount=4
+CurrentEditView=D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\magick\ImageMagick.pas
+View0=0
+View1=1
+View2=2
+View3=3
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=10000
+Height=9109
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=10000
+ClientHeight=9109
+DockedToMainForm=1
+MessageView=MessageView@EditWindow0
+BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
+TopPanelSize=0
+LeftPanelSize=1895
+LeftPanelClients=DockSite2
+LeftPanelData=00000800010100000000BE0F0000000000000167070000000000000100000000FC1B000009000000446F636B5369746532FFFFFFFF
+RightPanelSize=0
+BottomPanelSize=1910
+BottomPanelClients=MessageView@EditWindow0,DockSite1
+BottomPanelData=0000080001020100000009000000446F636B53697465311B4100000000000002760700000000000001000000001B4100000B0000004D65737361676556696577FFFFFFFF
+BottomMiddlePanelSize=0
+BottomMiddlePanelClients=DockSite0
+BottomMiddelPanelData=0000080001000100000009000000446F636B53697465302F19000000000000007D1B000000000000FFFFFFFF
+
+[View0]
+CustomEditViewType=TEditView
+Module=D:\_Projects.pi\ZBar01\D2007\src\fMain.pas
+CursorX=29
+CursorY=326
+TopLine=311
+LeftCol=1
+Elisions=
+Bookmarks={7,533,1}
+EditViewName=D:\_Projects.pi\ZBar01\D2007\src\fMain.pas
+
+[View1]
+CustomEditViewType=TEditView
+Module=D:\_Projects.pi\ZBar01\D2007\lib\ZBar.pas
+CursorX=19
+CursorY=456
+TopLine=446
+LeftCol=1
+Elisions=
+Bookmarks=
+EditViewName=D:\_Projects.pi\ZBar01\D2007\lib\ZBar.pas
+
+[View2]
+CustomEditViewType=TEditView
+Module=D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\wand\magick_wand.pas
+CursorX=1
+CursorY=62
+TopLine=52
+LeftCol=1
+Elisions=
+Bookmarks=
+EditViewName=D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\wand\magick_wand.pas
+
+[View3]
+CustomEditViewType=TEditView
+Module=D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\magick\ImageMagick.pas
+CursorX=44
+CursorY=41
+TopLine=29
+LeftCol=1
+Elisions=
+Bookmarks=
+EditViewName=D:\_Projects.pi\ZBar01\D2007\lib\ImageMagick\magick\ImageMagick.pas
+
+[Watches]
+Count=0
+
+[WatchWindow]
+WatchColumnWidth=120
+WatchShowColumnHeaders=1
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3833
+Height=1354
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3833
+ClientHeight=1354
+TBDockHeight=208
+LRDockWidth=13604
+Dockable=1
+StayOnTop=0
+
+[Breakpoints]
+Count=0
+
+[AddressBreakpoints]
+Count=0
+
+[Main Window]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=0
+State=2
+Left=139
+Top=266
+Width=8931
+Height=8530
+MaxLeft=-7
+MaxTop=-12
+MaxWidth=10111
+MaxHeight=10185
+ClientWidth=10000
+ClientHeight=9734
+BottomPanelSize=9109
+BottomPanelClients=EditWindow0
+BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF
+
+[ProjectManager]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2118
+Height=7222
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2118
+ClientHeight=7222
+TBDockHeight=5903
+LRDockWidth=2354
+Dockable=1
+StayOnTop=0
+
+[ToolForm]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2118
+Height=6933
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2118
+ClientHeight=6933
+TBDockHeight=7153
+LRDockWidth=2083
+Dockable=1
+StayOnTop=0
+
+[TemplateView]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=8174
+Top=5266
+Width=2472
+Height=4780
+MaxLeft=-7
+MaxTop=-12
+ClientWidth=2361
+ClientHeight=4329
+TBDockHeight=370
+LRDockWidth=271
+Dockable=1
+StayOnTop=0
+Name=120
+Description=334
+filter=1
+
+[DebugLogView]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3833
+Height=1354
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3833
+ClientHeight=1354
+TBDockHeight=405
+LRDockWidth=4951
+Dockable=1
+StayOnTop=0
+
+[ThreadStatusWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3833
+Height=1354
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3833
+ClientHeight=1354
+TBDockHeight=208
+LRDockWidth=7410
+Dockable=1
+StayOnTop=0
+Column0Width=145
+Column1Width=100
+Column2Width=115
+Column3Width=250
+
+[LocalVarsWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3833
+Height=1354
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3833
+ClientHeight=1354
+TBDockHeight=1539
+LRDockWidth=3486
+Dockable=1
+StayOnTop=0
+
+[CallStackWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3833
+Height=1354
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3833
+ClientHeight=1354
+TBDockHeight=2072
+LRDockWidth=3486
+Dockable=1
+StayOnTop=0
+
+[TFileExplorerForm]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=611
+Top=845
+Width=2007
+Height=3079
+MaxLeft=-7
+MaxTop=-12
+ClientWidth=1896
+ClientHeight=2627
+TBDockHeight=6204
+LRDockWidth=2840
+Dockable=1
+StayOnTop=0
+
+[FindReferencsForm]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2340
+Height=949
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2340
+ClientHeight=949
+TBDockHeight=2315
+LRDockWidth=2826
+Dockable=1
+StayOnTop=0
+
+[RefactoringForm]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2340
+Height=1181
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2340
+ClientHeight=1181
+TBDockHeight=3206
+LRDockWidth=2826
+Dockable=1
+StayOnTop=0
+
+[ToDo List]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2340
+Height=1181
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2340
+ClientHeight=1181
+TBDockHeight=1157
+LRDockWidth=3667
+Dockable=1
+StayOnTop=0
+Column0Width=314
+Column1Width=30
+Column2Width=150
+Column3Width=172
+Column4Width=129
+SortOrder=4
+ShowHints=1
+ShowChecked=1
+
+[DataExplorer]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=3389
+Top=3669
+Width=2069
+Height=4155
+MaxLeft=-7
+MaxTop=-12
+ClientWidth=1958
+ClientHeight=3704
+TBDockHeight=4873
+LRDockWidth=7153
+Dockable=1
+StayOnTop=0
+
+[PropertyInspector]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2021
+Height=6609
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2021
+ClientHeight=6609
+TBDockHeight=405
+LRDockWidth=1972
+Dockable=1
+StayOnTop=0
+SplitPos=135
+
+[PropInspDesignerSelection]
+ArrangeBy=Name
+SelectedItem=Name,OnAlignInsertBefore
+ExpandedItems=Anchors=0,BorderIcons=0,Constraints=0,Font=0,GlassFrame=0,HorzScrollBar=0,Margins=0,Padding=0,VertScrollBar=0,BevelEdges=0
+
+[BreakpointWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3833
+Height=1354
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3833
+ClientHeight=1354
+TBDockHeight=1551
+LRDockWidth=8736
+Dockable=1
+StayOnTop=0
+Column0Width=141
+Column1Width=75
+Column2Width=200
+Column3Width=200
+Column4Width=75
+Column5Width=75
+
+[StructureView]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=2465
+Top=3461
+Width=2007
+Height=3438
+MaxLeft=-7
+MaxTop=-12
+ClientWidth=1896
+ClientHeight=2986
+TBDockHeight=3681
+LRDockWidth=1257
+Dockable=1
+StayOnTop=0
+
+[fmGrepResults]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=2826
+Top=671
+Width=4333
+Height=8657
+MaxLeft=-7
+MaxTop=-12
+ClientWidth=4222
+ClientHeight=8206
+TBDockHeight=8657
+LRDockWidth=4333
+Dockable=1
+StayOnTop=0
+
+[fmMacroLibrary]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=3819
+Top=2593
+Width=2354
+Height=4815
+MaxLeft=-7
+MaxTop=-12
+ClientWidth=2243
+ClientHeight=4363
+TBDockHeight=4815
+LRDockWidth=2354
+Dockable=1
+StayOnTop=0
+
+[MIDEXForm]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2118
+Height=6933
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2118
+ClientHeight=6933
+TBDockHeight=7998
+LRDockWidth=1903
+Dockable=1
+StayOnTop=0
+Layout=0
+Split=202
+ContentsClosed=0
+
+[MessageView@EditWindow0]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=23
+Width=10000
+Height=1644
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=10000
+ClientHeight=1644
+TBDockHeight=1644
+LRDockWidth=4326
+Dockable=1
+StayOnTop=0
+
+[BorlandEditorCodeExplorer@EditWindow0]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=0
+Top=0
+Width=1833
+Height=6181
+MaxLeft=-7
+MaxTop=-12
+ClientWidth=1722
+ClientHeight=5729
+TBDockHeight=6181
+LRDockWidth=1833
+Dockable=1
+StayOnTop=0
+
+[DockHosts]
+DockHostCount=3
+
+[DockSite0]
+HostDockSite=DockBottomCenterPanel
+DockSiteType=1
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2340
+Height=1470
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2340
+ClientHeight=1470
+TBDockHeight=1470
+LRDockWidth=2340
+Dockable=1
+StayOnTop=0
+TabPosition=1
+ActiveTabID=RefactoringForm
+TabDockClients=RefactoringForm,FindReferencsForm,ToDo List
+
+[DockSite1]
+HostDockSite=DockBottomPanel
+DockSiteType=1
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=720
+Top=23
+Width=3833
+Height=1644
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3833
+ClientHeight=1644
+TBDockHeight=1644
+LRDockWidth=3833
+Dockable=1
+StayOnTop=0
+TabPosition=1
+ActiveTabID=DebugLogView
+TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow
+
+[DockSite2]
+HostDockSite=DockLeftPanel
+DockSiteType=1
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=23
+Width=2021
+Height=6898
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2021
+ClientHeight=6898
+TBDockHeight=4375
+LRDockWidth=2021
+Dockable=1
+StayOnTop=0
+TabPosition=0
+ActiveTabID=PropertyInspector
+TabDockClients=ProjectManager,MIDEXForm,PropertyInspector,ToolForm
+

BIN
src/ZBar01.identcache


BIN
src/ZBar01.res


+ 10 - 0
src/ZBar01.stat

@@ -0,0 +1,10 @@
+[Stats]
+EditorSecs=371
+DesignerSecs=18
+InspectorSecs=1
+CompileSecs=2856
+OtherSecs=19
+StartTime=2020-11-18 11:21:56
+RealKeys=0
+EffectiveKeys=0
+DebugSecs=131

+ 123 - 0
src/fMain.dfm

@@ -0,0 +1,123 @@
+object FormZBar: TFormZBar
+  Left = 0
+  Top = 0
+  Caption = 'FormZBar'
+  ClientHeight = 483
+  ClientWidth = 505
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -19
+  Font.Name = 'Tahoma'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poScreenCenter
+  OnClose = FormClose
+  OnCreate = FormCreate
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 23
+  object moLog: TMemo
+    Left = 0
+    Top = 253
+    Width = 505
+    Height = 230
+    Align = alClient
+    Lines.Strings = (
+      'moLog')
+    TabOrder = 0
+    ExplicitLeft = 52
+    ExplicitTop = 48
+    ExplicitWidth = 185
+    ExplicitHeight = 89
+  end
+  object Panel1: TPanel
+    Left = 0
+    Top = 0
+    Width = 505
+    Height = 253
+    Align = alTop
+    TabOrder = 1
+    object Label1: TLabel
+      Left = 8
+      Top = 19
+      Width = 38
+      Height = 23
+      Caption = #21629#20196
+    end
+    object cbComm: TComboBox
+      Left = 52
+      Top = 16
+      Width = 216
+      Height = 31
+      ItemHeight = 23
+      TabOrder = 0
+      Text = 'cbComm'
+      Items.Strings = (
+        '--help'
+        '--version'
+        '--quiet'
+        '--verbose'
+        '--verbose='
+        '--display'
+        '--nodisplay'
+        '--set'
+        '--xml'
+        '--noxml'
+        '--raw'
+        'S'
+        'h'
+        'q'
+        'v'
+        'd')
+    end
+    object btnAdd: TButton
+      Left = 280
+      Top = 22
+      Width = 75
+      Height = 25
+      Caption = #26032#22686
+      TabOrder = 1
+      OnClick = btnAddClick
+    end
+    object boxComm: TListBox
+      Left = 52
+      Top = 60
+      Width = 216
+      Height = 173
+      ItemHeight = 23
+      TabOrder = 2
+    end
+    object btnRun: TButton
+      Left = 280
+      Top = 164
+      Width = 75
+      Height = 69
+      Caption = #22519#34892
+      TabOrder = 3
+      OnClick = btnRunClick
+    end
+    object Button2: TButton
+      Left = 280
+      Top = 60
+      Width = 75
+      Height = 25
+      Caption = #28165#38500
+      TabOrder = 4
+      OnClick = Button2Click
+    end
+  end
+  object tmrBegin: TTimer
+    Enabled = False
+    Interval = 100
+    OnTimer = tmrBeginTimer
+    Left = 448
+    Top = 24
+  end
+  object tmrRun: TTimer
+    Enabled = False
+    OnTimer = tmrRunTimer
+    Left = 440
+    Top = 144
+  end
+end

+ 677 - 0
src/fMain.pas

@@ -0,0 +1,677 @@
+{*------------------------------------------------------------------------
+ *  Copyright 2007-2010 (c) Jeff Brown <[email protected]>
+ *
+ *  This file is part of the ZBar Bar Code Reader.
+ *
+ *  The ZBar Bar Code Reader is free software; you can redistribute it
+ *  and/or modify it under the terms of the GNU Lesser Public License as
+ *  published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  The ZBar Bar Code Reader is distributed in the hope that it will be
+ *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ *  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Lesser Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser Public License
+ *  along with the ZBar Bar Code Reader; if not, write to the Free
+ *  Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ *  Boston, MA  02110-1301  USA
+ *
+ *  http://sourceforge.net/projects/zbar
+ *
+ * Conversion to Delphi Copyright 2013 (c) Aleksandr Nazaruk <[email protected]>
+ * Conversion to Delphi2007 Copyright 2017 (c) Hao Lin Chang <[email protected]>
+ *------------------------------------------------------------------------*}
+
+unit fMain;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, ZBar, magick_wand, ImageMagick, ExtCtrls, StdCtrls;
+
+const
+  note_usage =
+    'usage: zbarimg [options] <image>...' + #10#13 +
+    #10#13 +
+    'scan and decode bar codes from one or more image files' + #10#13 +
+    #10#13 +
+    'options:' + #10#13 +
+    '    -h, --help      display this help text' + #10#13 +
+    '    --version       display version information and exit' + #10#13 +
+    '    -q, --quiet     minimal output, only print decoded symbol data' + #10#13 +
+    '    -v, --verbose   increase debug output level' + #10#13 +
+    '    --verbose=N     set specific debug output level' + #10#13 +
+    '    -d, --display   enable display of following images to the screen' + #10#13 +
+    '    -D, --nodisplay disable display of following images (default)' + #10#13 +
+    '    --xml, --noxml  enable/disable XML output format' + #10#13 +
+    '    --raw           output decoded symbol data without symbology prefix' + #10#13 +
+    '    -S<CONFIG>[=<VALUE>], --set <CONFIG>[=<VALUE>]' + #10#13 +
+    '                    set decoder/scanner <CONFIG> to <VALUE> (or 1)' + #10#13;
+
+const
+  warning_not_found =
+    #10#13 +
+    'WARNING: barcode data was not detected in some image(s)' + #10#13 +
+    '  things to check:' + #10#13 +
+    '    - is the barcode type supported?' +
+    '  currently supported symbologies are:' + #10#13 +
+    '      EAN/UPC (EAN-13, EAN-8, EAN-2, EAN-5, UPC-A, UPC-E,' + #10#13 +
+    '      ISBN-10, ISBN-13), Code 128, Code 93, Code 39, DataBar,' + #10#13 +
+    '      DataBar Expanded, and Interleaved 2 of 5' + #10#13 +
+    '    - is the barcode large enough in the image?' + #10#13 +
+    '    - is the barcode mostly in focus?' + #10#13 +
+    '    - is there sufficient contrast/illumination?' + #10#13;
+
+const
+  xml_head =
+    '<barcodes xmlns="http://zbar.sourceforge.net/2008/barcode">';
+
+const
+  xml_foot =
+    '</barcodes>';
+type
+  TFormZBar = class(TForm)
+    tmrBegin: TTimer;
+    moLog: TMemo;
+    Panel1: TPanel;
+    cbComm: TComboBox;
+    Label1: TLabel;
+    btnAdd: TButton;
+    boxComm: TListBox;
+    btnRun: TButton;
+    Button2: TButton;
+    tmrRun: TTimer;
+    procedure btnAddClick(Sender: TObject);
+    procedure btnRunClick(Sender: TObject);
+    procedure Button2Click(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
+    procedure FormCreate(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure tmrBeginTimer(Sender: TObject);
+    procedure tmrRunTimer(Sender: TObject);
+  private
+    display: integer;
+    exit_code: integer;
+    init: Boolean;
+    lstParam: TStrings;
+    major: cardinal;
+    minor: cardinal;
+    notfound: integer;
+    num_images: integer;
+    num_symbols: integer;
+    processor: zbar_processor_t;
+    quiet: integer;
+    RunID: Integer;
+    xmlbuf: PAnsichar;
+    xmlbuflen: Cardinal;
+    xmllvl: integer;
+    function dump_error(wand: PMagickWand): integer;
+    function parse_config(cfgstr: PAnsiChar; arg: PAnsiChar): integer;
+    function scan_image(filename: PAnsiChar): integer;
+    function usage(rc: integer; msg: PAnsiChar; arg: PAnsiChar): integer;
+  end;
+
+var
+  FormZBar: TFormZBar;
+
+implementation
+
+{$R *.dfm}
+
+procedure TFormZBar.btnAddClick(Sender: TObject);
+begin
+  if cbComm.Text <> '' then
+    boxComm.Items.Add(cbComm.Text);
+end;
+
+procedure TFormZBar.btnRunClick(Sender: TObject);
+begin
+  if boxComm.Items.Count <= 0 then
+    Exit;
+
+  RunID := 0;
+  tmrRun.Enabled := True;
+end;
+
+procedure TFormZBar.Button2Click(Sender: TObject);
+begin
+  boxComm.Items.Clear;
+end;
+
+function TFormZBar.dump_error(wand: PMagickWand): integer;
+const
+  sevdesc: array[0..2] of AnsiString = ('WARNING', 'ERROR', 'FATAL');
+var
+  desc: PAnsiChar;
+  severity: ExceptionType;
+begin
+  desc := MagickGetException(wand, @severity);
+  if (severity >= FatalErrorException) then
+    exit_code := 2
+  else if (severity >= ErrorException) then
+    exit_code := 1
+  else
+    exit_code := 0;
+  moLog.Lines.Add(format('%s: %s', [sevdesc[exit_code], desc]));
+  MagickRelinquishMemory(desc);
+  result := exit_code;
+end;
+
+procedure TFormZBar.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+  try
+    if processor <> nil then
+      zbar_processor_destroy(processor);
+    //DestroyMagick();
+  except
+  end;
+
+  lstParam.Clear;
+  lstParam.Destroy;
+end;
+
+procedure TFormZBar.FormCreate(Sender: TObject);
+var
+  i, j: integer;
+  arg: array[0..255] of AnsiChar;
+
+  sArg: string;
+begin
+  notfound := 0;
+  exit_code := 0;
+  num_images := 0;
+  num_symbols := 0;
+  xmllvl := 0;
+  xmlbuf := nil;
+  xmlbuflen := 0;
+  processor := nil;
+  quiet := 0;
+  display := 0;
+
+  moLog.Lines.Clear;
+
+  lstParam := TStringList.Create;
+
+  { TODO -oUser -cConsole Main : Insert code here }
+  for i := 1 to ParamCount do
+  begin
+    fillchar(arg, sizeof(arg), #0);
+    StrPCopy(arg, ParamStr(i));
+
+    sArg := arg;
+    lstParam.Add(sArg);
+
+    if ((arg[0] <> '-') or (arg[1] = '')) then
+    begin
+      inc(num_images);
+    end
+    else if arg[1] <> '-' then
+    begin
+      for j := 1 to length(arg) - 1 do
+      begin
+        if arg[j] = 'S' then
+        begin
+          ;
+        end;
+        if arg[j] = 'h' then
+        begin
+          usage(0, '', '');
+          exit;
+        end
+        else if arg[j] = 'q' then
+        begin
+          quiet := 1;
+          break;
+        end
+        else if arg[j] = 'v' then
+        begin
+          zbar_increase_verbosity();
+          break
+        end
+        else if arg[j] = 'd' then
+        begin
+          display := 1;
+          break
+        end
+        else if arg[j] = 'D' then
+          break
+        else
+        begin
+          usage(1, 'ERROR: unknown bundled option: -', arg);
+          //exit;
+        end;
+      end;
+    end
+    else if AnsiCompareStr(arg, '--help') = 0 then
+    begin
+      usage(0, '', '');
+      exit;
+    end
+    else if AnsiCompareStr(arg, '--version') = 0 then
+    begin
+      zbar_version(major, minor);
+      moLog.Lines.Add(format('%d.%d', [major, minor]));
+      exit;
+    end
+    else if AnsiCompareStr(arg, '--quiet') = 0 then
+    begin
+      quiet := 1;
+      // exit; //-----------?
+    end
+    else if AnsiCompareStr(arg, '--verbose') = 0 then
+    begin
+      zbar_increase_verbosity();
+    end
+    else if AnsiCompareStr(copy(arg, 1, 10), '--verbose=') = 0 then
+    begin
+      try
+        zbar_set_verbosity(strtoint(copy(arg, 11, length(arg) - 10)));
+      except
+        zbar_set_verbosity(0);
+      end;
+    end
+    else if AnsiCompareStr(arg, '--display') = 0 then
+    begin
+      inc(display);
+    end
+    else if ((AnsiCompareStr(arg, '--nodisplay') = 0) or
+      (AnsiCompareStr(arg, '--set') = 0) or
+      (AnsiCompareStr(arg, '--xml') = 0) or
+      (AnsiCompareStr(arg, '--noxml') = 0) or
+      (AnsiCompareStr(arg, '--raw') = 0)) then
+    begin
+      continue;
+    end
+    else
+      usage(1, 'ERROR: unknown option: ', arg);
+  end;
+
+  init := False;
+end;
+
+procedure TFormZBar.FormShow(Sender: TObject);
+begin
+  if not init then
+  begin
+    init := True;
+
+    {if num_images = 0 then
+    begin
+      usage(1, 'ERROR: specify image file(s) to scan', '');
+      Application.Terminate;
+      //exit;
+    end;}
+    num_images := 0;
+
+    tmrBegin.Enabled := True;
+  end;
+end;
+
+function TFormZBar.parse_config(cfgstr: PAnsiChar; arg: PAnsiChar): integer;
+begin
+  result := 0;
+  if length(cfgstr) > 0 then
+    result := usage(1, 'ERROR: need argument for option: ', arg);
+
+  if zbar_processor_parse_config(processor, cfgstr) = 0 then
+    result := usage(1, 'ERROR: invalid configuration setting:', cfgstr);
+end;
+
+function TFormZBar.scan_image(filename: PAnsiChar): integer;
+type
+  cuint32 = LongWord;
+type
+  size_t = cuint32;
+
+var
+  found: integer;
+  images: PMagickWand;
+  seq, n: cardinal;
+  zimage: zbar_image_t;
+  width: integer;
+  height: integer;
+  bloblen: size_t;
+  blob: PByte;
+  sym: zbar_symbol_t;
+  typ: zbar_symbol_type_t;
+  len: integer;
+begin
+  found := 0;
+
+  if (exit_code = 3) then
+    result := -1;
+
+  images := NewMagickWand();
+  if ((MagickReadImage(images, filename) = MagickFalse) and (dump_error(images) > 0)) then
+    result := -1;
+
+  {if(!MagickReadImage(images, filename) && dump_error(images))
+      return(-1); }
+
+  n := MagickGetNumberImages(images);
+  for seq := 0 to n - 1 do
+  begin
+    if (exit_code = 3) then
+      result := -1;
+
+    if ((MagickSetImageIndex(images, seq) = MagickFalse) and (dump_error(images) > 0)) then
+      result := -1;
+
+    zimage := zbar_image_create;
+    Assert(Assigned(zimage), 'zbar-image');
+    zbar_image_set_format(zimage, 'Y800');
+
+    width := MagickGetImageWidth(images);
+    height := MagickGetImageHeight(images);
+    zbar_image_set_size(zimage, width, height);
+    zbar_image_set_size(zimage, Width, Height);
+
+    // extract grayscale image pixels
+    // FIXME color!! ...preserve most color w/422P
+    // (but only if it's a color image)
+    bloblen := width * height;
+    blob := GetMemory(bloblen);
+    zbar_image_set_data(zimage, blob, bloblen, nil);
+
+    if MagickGetImagePixels(images, 0, 0, width, height, 'I', CharPixel, blob) = MagickFalse then
+      result := -1;
+
+    if (xmllvl = 1) then
+    begin
+      inc(xmllvl);
+      moLog.Lines.Add(Format('<source href="%s">', [filename]));
+    end;
+
+    zbar_process_image(processor, zimage);
+
+    // output result data
+    sym := zbar_image_first_symbol(zimage);
+    while Assigned(sym) do
+    begin
+      typ := zbar_symbol_get_type(sym);
+      //len := zbar_symbol_get_data_length(sym);
+      if typ = ZBAR_PARTIAL then
+        continue;
+
+      if (xmllvl <= 0) then
+      begin
+        if xmllvl = 0 then
+          moLog.Lines.Add(Format('%s:', [zbar_get_symbol_name(typ)]));
+        moLog.Lines.Add(string(AnsiString(zbar_symbol_get_data(sym))))
+      end
+      else
+      begin
+        if (xmllvl < 3) then
+        begin
+          inc(xmllvl);
+          moLog.Lines.Add(Format('<index num="%u">', [seq]));
+        end;
+        zbar_symbol_xml(sym, xmlbuf, xmlbuflen);
+        moLog.Lines.Add(xmlbuf);
+      end;
+      inc(found);
+      inc(num_symbols);
+      sym := zbar_symbol_next(sym);
+    end;
+
+    if (xmllvl > 2) then
+    begin
+      dec(xmllvl);
+      moLog.Lines.Add('</index>');
+    end;
+
+    //moLog.Lines.Addtofile;
+    zbar_image_destroy(zimage);
+    inc(num_images);
+    if zbar_processor_is_visible(processor) = 1 then
+      zbar_processor_user_wait(processor, -1);
+  end;
+
+  if (xmllvl > 1) then
+  begin
+    dec(xmllvl);
+    moLog.Lines.Add('</source>');
+  end;
+
+  if found = 0 then
+    inc(notfound);
+  DestroyMagickWand(images);
+  result := 0;
+end;
+
+procedure TFormZBar.tmrBeginTimer(Sender: TObject);
+var
+  i, j: Integer;
+  ParamTotal: Integer;
+  arg: string;
+begin
+  tmrBegin.Enabled := False;
+
+  cbComm.Text := 'Test01.png';
+  boxComm.Items.Clear;
+  boxComm.Items.Add('Test01.png');
+
+
+  processor := zbar_processor_create(0);
+  Assert(Assigned(processor), 'zbar-processor');
+  if zbar_processor_init(processor, nil, 1) = 1 then
+  begin
+    zbar_processor_error_spew(processor, 0);
+  end;
+
+  ParamTotal := lstParam.Count;
+  for i := 0 to ParamTotal - 1 do
+  begin
+    arg := moLog.Lines.Strings[i];
+    if length(arg) <= 0 then
+      continue;
+    if ((arg[1] <> '-') or (arg[2] = '')) then
+    begin
+      scan_image(PAnsiChar(arg));
+    end
+    else if arg[2] <> '-' then
+    begin
+      for j := 1 to length(arg) do
+      begin
+        if arg[j] = 'S' then
+        begin
+          ;
+        end
+        else if arg[j] = 'd' then
+        begin
+          zbar_processor_set_visible(processor, 1);
+          break
+        end
+        else if arg[j] = 'D' then
+        begin
+          zbar_processor_set_visible(processor, 0);
+          break;
+        end
+      end;
+    end
+    else if AnsiCompareStr(arg, '--display') = 0 then
+    begin
+      zbar_processor_set_visible(processor, 1);
+    end
+    else if AnsiCompareStr(arg, '--nodisplay') = 0 then
+    begin
+      zbar_processor_set_visible(processor, 0);
+    end
+    else if AnsiCompareStr(arg, '--xml') = 0 then
+    begin
+      if (xmllvl < 1) then
+      begin
+        xmllvl := 1;
+        //fflush(stdout);
+        //_setmode(_fileno(stdout), _O_BINARY);
+        moLog.Lines.Add(Format('%s', [xml_head]));
+      end;
+    end
+    else if ((AnsiCompareStr(arg, '--noxml') = 0) or (AnsiCompareStr(arg, '--raw') = 0)) then
+    begin
+      if (xmllvl > 0) then
+      begin
+        xmllvl := 0;
+        //fflush(stdout);
+        //_setmode(_fileno(stdout), _O_BINARY);
+        moLog.Lines.Add(Format('%s', [xml_head]));
+      end;
+      if AnsiCompareStr(arg, '--raw') = 0 then
+      begin
+        xmllvl := -1;
+      end;
+    end
+    else if AnsiCompareStr(arg, '--') = 0 then
+      break;
+  end;
+
+  for i := 0 to ParamTotal - 1 do
+  begin
+    scan_image(PansiChar(ParamStr(i)));
+  end;
+
+  //* ignore quit during last image *//
+  if (exit_code = 3) then
+    exit_code := 0;
+
+  if (xmllvl > 0) then
+  begin
+    xmllvl := -1;
+    moLog.Lines.Add(Format('%s', [xml_foot]));
+    //fflush(stdout);
+  end;
+
+  //  if Assigned(xmlbuf) then
+  //      freeMem(xmlbuf);
+
+  if ((num_images > 0) and (quiet = 0) and (xmllvl <= 0)) then
+  begin
+    moLog.Lines.Add(Format('scanned %d barcode symbols from %d images', [num_symbols, num_images]));
+    if (notfound > 0) then
+      moLog.Lines.Add(Format('%s', [warning_not_found]));
+  end;
+
+  if ((num_images > 0) and (notfound > 0) and (exit_code <> 0)) then
+    exit_code := 4;
+end;
+
+procedure TFormZBar.tmrRunTimer(Sender: TObject);
+var
+  arg: string;
+  j: Integer;
+begin
+  if RunID >= boxComm.Items.Count then
+  begin
+    tmrRun.Enabled := False;
+    Exit;
+  end;
+  arg := boxComm.Items.Strings[RunID];
+  inc(RunID);
+
+  if length(arg) <= 0 then
+    Exit;
+
+  tmrRun.Enabled := False;
+  try
+    if ((arg[1] <> '-') or (arg[2] = '')) then
+    begin
+      scan_image(PAnsiChar(arg));
+    end
+    else if arg[2] <> '-' then
+    begin
+      for j := 1 to length(arg) do
+      begin
+        if arg[j] = 'S' then
+        begin
+          ;
+        end
+        else if arg[j] = 'd' then
+        begin
+          zbar_processor_set_visible(processor, 1);
+          Break;
+        end
+        else if arg[j] = 'D' then
+        begin
+          zbar_processor_set_visible(processor, 0);
+          Break;
+        end
+      end;
+    end
+    else if AnsiCompareStr(arg, '--display') = 0 then
+    begin
+      zbar_processor_set_visible(processor, 1);
+    end
+    else if AnsiCompareStr(arg, '--nodisplay') = 0 then
+    begin
+      zbar_processor_set_visible(processor, 0);
+    end
+    else if AnsiCompareStr(arg, '--xml') = 0 then
+    begin
+      if (xmllvl < 1) then
+      begin
+        xmllvl := 1;
+        //fflush(stdout);
+        //_setmode(_fileno(stdout), _O_BINARY);
+        moLog.Lines.Add(Format('%s', [xml_head]));
+      end;
+    end
+    else if ((AnsiCompareStr(arg, '--noxml') = 0) or (AnsiCompareStr(arg, '--raw') = 0)) then
+    begin
+      if (xmllvl > 0) then
+      begin
+        xmllvl := 0;
+        //fflush(stdout);
+        //_setmode(_fileno(stdout), _O_BINARY);
+        moLog.Lines.Add(Format('%s', [xml_head]));
+      end;
+      if AnsiCompareStr(arg, '--raw') = 0 then
+      begin
+        xmllvl := -1;
+      end;
+    end;
+
+    //* ignore quit during last image *//
+    if (exit_code = 3) then
+      exit_code := 0;
+
+    if (xmllvl > 0) then
+    begin
+      xmllvl := -1;
+      moLog.Lines.Add(Format('%s', [xml_foot]));
+      //fflush(stdout);
+    end;
+
+    //  if Assigned(xmlbuf) then
+    //      freeMem(xmlbuf);
+
+    if ((num_images > 0) and (quiet = 0) and (xmllvl <= 0)) then
+    begin
+      moLog.Lines.Add(Format('scanned %d barcode symbols from %d images', [num_symbols, num_images]));
+      if (notfound > 0) then
+        moLog.Lines.Add(Format('%s', [warning_not_found]));
+    end;
+
+    if ((num_images > 0) and (notfound > 0) and (exit_code <> 0)) then
+      exit_code := 4;
+  finally
+    tmrRun.Enabled := True;
+  end;
+end;
+
+function TFormZBar.usage(rc: integer; msg: PAnsiChar; arg: PAnsiChar): integer;
+begin
+  if length(msg) > 0 then
+  begin
+    moLog.Lines.Add(format('%s', [msg]));
+    if length(arg) > 0 then
+      moLog.Lines.Add(format('%s', [arg]));
+    moLog.Lines.Add('');
+  end;
+  moLog.Lines.Add(format('%s', [note_usage]));
+  result := rc;
+end;
+
+end.

BIN
zlib1.dll