Using MagickRotateImage with Lazarus (Pascal)

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Steve_
Posts: 6
Joined: 2015-10-18T08:39:23-07:00
Authentication code: 1151

Using MagickRotateImage with Lazarus (Pascal)

Post by Steve_ »

Hi, I need some help getting started with the Lazarus APIs. I can display a png image (with the code below) but I can't find a way to rotate the image using: MagickRotateImage(Wand,Background,degrees). Putting it in the code below has no effect. Thanks for any help.

//-----------------------------------Displays the Image in a Lazarus Window-------------------------------------
procedure OpenBitMap;
var
Bitmap: TBitmap;
wand: PMagickWand;
status: MagickBooleanType;
begin
Bitmap := TBitmap.Create;
wand := NewMagickWand;
status := MagickReadImage(wand, PChar(UTF8ToSys('c:\temp\testimage.png'));

LoadMagickBitmapWand(wand, Bitmap);

Form1.Canvas.Brush.Bitmap := Bitmap;
Form1.Canvas.FillRect(Rect(0,0,Bitmap.Width,Bitmap.Height));
end;
//--------------------------------------------------------------------------------------------------
Post Reply