Image32 -
A 2D graphics library for Delphi programmers

Image32 is a compact 2D graphics library written in Delphi Pascal. It provides an extensive range of image manipulation functions. It also includes a polygon renderer for line and polygon drawing. The renderer supports a range of brush filling options including tiled images, and linear and radial gradient fills.

Version: 1.0
Uploaded: 8 July 2019
Freeware for both open source and commercial applications (Boost Software License).
Copyright © 2019 Angus Johnson

Online documentation is here.
Download Library: Image32 Library.

Image processing

A TImage32 has an extensive list of methods to manipulate images including: hue, luminance & saturation adjustment; box blur & Gaussian blur; erase color; blend merge images; crop; emboss; flip & rotation; scaling; sharpen; skew etc.

  uses Image32, Image32_BMP, Image32_PNG;
  img := TImage32.Create;

  uses Image32, Image32_PNG;
  img := TImage32.Create;
  img.Sharpen(3, 30);

  uses Image32, Image32_PNG, Image32_Extra;
  img := TImage32.Create;
  RedEyeRemove(img, Rect(59,87, 78,106));
  RedEyeRemove(img, Rect(193,99, 212,118));

Polygon Rendering

Image32 also provides numerous drawing tools for line and polygon drawing including support for solid, gradient and image filled lines, dashed lines and polygons. The library also provides numerous functions for vector drawing, including: Rectangle; RoundRect; Ellipse; Pie & Arc; CBezier & QBezier; Star; etc.

      uses Image32, Image32_PNG,
        Image32_vector, Image32_Draw, Image32_Clipper;
        img: TImage32;
        path: TArrayOfPointD;
        paths: TArrayOfArrayOfPointD;
        rec := img.Bounds;
        Windows.InflateRect(rec, -50,-50);

        path := Star(PointD(128, 128), 50, 100, 7);
        //draw the outline
        DrawLine(img, path, 1, clBlack32, esClosed);
        //setup the color gradient
        radGradRend := TRadialGradientRenderer.Create;
        radGradRend.SetParameters(rec, clFuchsia32, clYellow32);
        //draw the polygon 
        DrawPolygon(img, path, frNonZero, radGradRend);
        //and draw a dashed outline 
        paths := InflatePolygon(path, 7, jsRound);
        DrawDashedLine(img, paths,
          [4,4], 0, 1, clBlack32, esClosed);


      uses Image32, Image32_PNG, Image32_Text, 
        Image32_Draw, Image32_Extra;
        img: TImage32;
        startPt, endPt: TPointD;
        paths: TArrayOfArrayOfPointD;
        lf: TLogFont;
        fi: TFontInfo;
        lf := DefaultLogfont;
        lf.lfFaceName := 'Impact';
        lf.lfHeight := -96;
        fi := GetFontInfo(lf);

        startPt := PointD(20, 130);
        img := TImage32.Create(400,150);
        paths := GetTextOutline(startPt.X, startPt.Y, 
          'Image32', fi, taLeft, endPt);
		//Draw a drop shadow
        DrawShadow(img, paths, frNonZero, $80000000, -3,3, 3);        
		//outline and fill the text polygons
        DrawLine(img, paths, 1, clBlack32, esClosed);
        DrawPolygon(img, paths, frNonZero, $FF00DD00);
		//finally add a 3D highlight using default colors
        Draw3D(img, paths, frNonZero, 3,4);


BitmapPanels -
Delphi panels turned into powerful image viewers

BitmapPanels provides an incredibly easy way to convert standard TPanel controls into powerful image viewers. You don't even need to install a component. Simply add BitmapPanels to the interface's uses clause in your form's unit, and TPanel controls on that form will automatically become image viewers - if or when images are assigned to their new Bitmap properties.

Version: 1.0
Uploaded: 8 July 2019
Freeware for both open source and commercial applications (Boost Software License).
Copyright © 2019 Angus Johnson

Download: BitmapPanels.

Key features:

BitmapPanels keyboard actions:

assuming the Panel's TabStop property = true
0 (zero)Scales the image to best fit
1..9Scales the image 1 to 9 times normal
[shift] + 1..9Scales the image 0.1 to 0.9 times normal
arrow keysnormal scrolling
[shift] + arrow keysaccelerated (5 times normal) scrolling
[ctrl] + up arrowzoom in
[ctrl] + down arrowzoom out

Back to my Delphi Page « » Back to my Home Page