Sign in Join
Wiki copytemporary

PascalMagick/id: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: PascalMagick/id

OldNewLine
1+### Tentang
2+
3+#### Tentang ImageMagick
4+
5+[ImageMagick](http://www.imagemagick.org) is a free software suite developed to create, edit, and compose bitmap images. It supports a huge variety of formats (over 90) including formats like GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Images can be cropped, colors can be changed, various effects can be applied, images can be rotated and combined, and text, lines, polygons, ellipses and Bézier curves can be added to images and stretched and rotated.
6+
7+The suite runs on all major operating systems and it can also be used from the command line and it´s command line tools package is one of Linux standard packages, being distributed with many distributions.
8+
9+Fitur dan Kemampuan:
10+
11+- Convert an image from one format to another (e.g. PNG to JPEG)
12+- Resize, rotate, sharpen, color reduce, or add special effects to an image
13+- Create a montage of image thumbnails
14+- Create a transparent image suitable for use on the Web
15+- Turn a group of images into a GIF animation sequence
16+- Create a composite image by combining several separate image
17+- Draw shapes or text on an image
18+- Decorate an image with a border or frame
19+- Describe the format and characteristics of an image
20+
21+#### Buku ImageMagick
22+
23+[ImageMagick Tricks](http://www.packtpub.com/imagemagick/book) This fast paced and practical tutorial is packed with examples of photo manipulations, logo creation, animations, and complete web projects. With this book up your sleeve, you'll be creating spellbinding images from code in no time.
24+
25+#### Tentang MagickWand
26+
27+[MagickWand API](http://www.imagemagick.org/script/magick-wand.php) adalah antar muka yang direkomendasikan oleh tim ImageMagick. Mudah untuk menggunakan antar muka pemrograman untuk pemakaian paket.
28+
29+#### Tentang MagickCore
30+
31+The MagickCore API is a low-level interface for ImageMagick.
32+
33+#### Tentang PascalMagick
34+
35+Pemindahan ini adalah terjemahan dari file header c baik untuk MagickWand maupun Magick Core.
36+
37+### Screenshot
38+
39+### Pembuat
40+
41+Felipe Monteiro de Carvalho
42+
43+Ángel Eduardo García
44+
45+### Lisensi
46+
47+BSD-style dan kompatibel dengan GPL.
48+
49+Anda dapat membaca Lisensi [di sini](http://www.imagemagick.org/script/license.php).
50+
51+### Download
52+
53+PascalMagick 0.4 is available here: <http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=174103&release_id=431432>
54+
55+Status: Magick Wand headers are complete and working on both Windows and Linux.
56+
57+### Instalasi
58+
59+The current version of PascalMagick works on Windows and Linux. Beta testers are necessary for the Mac OS X version.
60+
61+To start with, install ImageMagick binaries from the official website: <http://www.imagemagick.org/script/binary-releases.php>
62+
63+Now download and unzip PascalMagick package (Instructions on the Download section above).
64+
65+To check that everything is working, open the PascalMagick/wand/wanddemo.lpi project. Now go to the Project --\> "Compiler Options dialog" and change the "Other Units" field to point to "../magick", so it can find the PascalMagick/magick/ImageMagick.pas file. After this you can compile and run the test program.
66+
67+If the program is working, it will load the image.png image located on the same directory as he is, resize it and then save it as a jpg called image.jpg.
68+
69+One Extra step is necessary on Linux: Rename the image.PNG to image.png due to case issues.
70+
71+### Demonstrasi program 1
72+
73+ {
74+ Demonstration program for the ImageMagick Library
75+
76+ This program was converted from c by: Felipe Monteiro de Carvalho
77+
78+ Usage: Just execute the program. It will resize the image.png image
79+ on it´s directory to fit (106, 80) and convert it to a jpg.
80+
81+ Dez/2005
82+ }
83+ {Version 0.1}
84+ program wanddemo;
85+
86+ {$mode objfpc}{$H+}
87+
88+ uses SysUtils, magick_wand, ImageMagick;
89+
90+ procedure ThrowWandException(wand: PMagickWand);
91+ var
92+ description: PChar;
93+ severity: ExceptionType;
94+ begin
95+ description := MagickGetException(wand, @severity);
96+ WriteLn(Format('An error ocurred. Description: %s', [description]));
97+ description := MagickRelinquishMemory(description);
98+ Abort;
99+ end;
100+
101+ var
102+ status: MagickBooleanType;
103+ wand: PMagickWand;
104+ begin
105+ { Read an image. }
106+
107+ MagickWandGenesis;
108+
109+ wand := NewMagickWand;
110+
111+ try
112+ status := MagickReadImage(wand, 'image.png');
113+ if (status = MagickFalse) then ThrowWandException(wand);
114+
115+ { Turn the images into a thumbnail sequence. }
116+
117+ MagickResetIterator(wand);
118+
119+ while (MagickNextImage(wand) <> MagickFalse) do
120+ MagickResizeImage(wand, 106, 80, LanczosFilter, 1.0);
121+
122+ { Write the image as MIFF and destroy it. }
123+
124+ status := MagickWriteImages(wand, 'image.jpg', MagickTrue);
125+ if (status = MagickFalse) then ThrowWandException(wand);
126+
127+ finally
128+ wand := DestroyMagickWand(wand);
129+
130+ MagickWandTerminus;
131+ end;
132+ end.
133+
134+### Subversion
135+
136+You can download the subversion version of this project using this command:
137+
138+svn checkout <http://svn.freepascal.org/svn/fpc/trunk/packages/base/imagemagick> imagemagick
139+
140+You can also download the full fpc 2.1.1 repository and it will be included.
141+
142+### Bug Reporting/Feature Request
143+
144+Tests are necessary to verify if the bindings work with all versions of ImageMagick.
145+
146+You can post Bug Reports / Feature Requests here:
147+
148+------------------------------------------------------------------------
149+
150+**Bug 1**
151+
152+There is an error in pixel_iterator.inc The correct declaration is function NewPixelIterator(wand: PMagickWand): PPixelIterator; cdecl; external WandExport;
153+
154+also the following declarations should be added function PixelGetNextIteratorRow(iterator: PPixeliterator; var wandCount : Cardinal) : PPPixelWand; cdecl; external WandExport;
155+
156+function PixelGetPreviousIteratorRow(iterator: PPixeliterator; var wandCount : Cardinal) : PPPixelWand; cdecl; external WandExport;
157+
158+Cheers, Todd.
159+
160+**Status**: Fixed on 0.3
161+
162+------------------------------------------------------------------------
163+
164+**Bug 2**
165+
166+There is a problem in "magick_wand.pas" and "ImageMagick.pas": the compiler option "{\$PACKRECORDS C}" must be in the "{\$ifdef FPC}\[...\]{\$endif}". Otherwise the units do not compile with Delphi (Delphi 7 in my case).
167+
168+Best wishes, Marc Geldon ([PRO IT SYSTEMS](http://www.proitsystems.de))
169+
170+------------------------------------------------------------------------
171+
172+**Bug 3**
173+
174+your definition of "MagickGetImagePage" in magick_image.inc:
175+
176+ function MagickGetImagePage(wand: PMagickWand; width, height: PCardinal; x, y: Integer): MagickBooleanType; cdecl; external WandExport;
177+
178+correct definition (x and y are "PInteger"!):
179+
180+ function MagickGetImagePage(wand: PMagickWand; width, height: PCardinal; x, y: PInteger): MagickBooleanType; cdecl; external WandExport;
181+
182+Best wishes, Marc Geldon ([PRO IT SYSTEMS](http://www.proitsystems.de))
183+
184+------------------------------------------------------------------------
185+
186+**Bug 4**
187+
188+ImageMagick 6.2.7 (don't know exactly what version) introduced a few changes in MagickWand record and others. Also, a few variable definitions were incorrectly declared, and some function imports missed the "cdecl", so they didn't work (like NewMagickWand()). I've fixed all this issues. Can I upload the changes somewhere?
189+
190+Best regards, Arcnor
191+
192+
193+Hello, you can send it to me, and I´ll apply the changes. My e-mail is felipemonteiro.carvalho@gmail.com By the way, did you correct bugs 2 and 3 also? thanks a lot --Sekelsenmat 05:07, 8 June 2006 (CEST)
194+
195+------------------------------------------------------------------------
196+
197+**Bug 5**
198+
199+MagickNewImage parameters convention is cdecl.
200+
201+Correct definition of MagickNewImage in magick_image.inc:
202+
203+ function MagickNewImage(wand: PMagickWand; const columns, rows: Cardinal;
204+ const background: PPixelWand): MagickBooleanType; cdecl; external WandExport;
205+
206+------------------------------------------------------------------------
207+
208+**Bug 6**
209+
210+MagickCompositeImage : Composite_wand is a PMagickWand constant.
211+
212+Correct definition of MagickCompositeImage in magick_image.inc:
213+
214+ function MagickCompositeImage(wand: PMagickWand; const composite_wand: PMagickWand;
215+ const compose: CompositeOperator; const x, y: Integer): MagickBooleanType; cdecl; external WandExport;
216+
217+--RuBBeR 18:03, 3 July 2006 (CEST)
218+
219+'''Status: Bugs 2-6 dibetulkan pada v0.4. Terima kasih kepada semuanya (Arcnor)
220+
221+### Log Perubahan
222+
223+- 07.11.07
224+
225+1. Added 4 missing functions on magick_image.inc on fpc subversion, but no new release
226+
227+- 12.07.06 PascalMagick version 0.4 released
228+
229+1. Last bugs fixed
230+
231+- 24.05.06 PascalMagick version 0.3 released
232+
233+1. Minor fixes on the bindings
234+
235+- 10.04.06 PascalMagick version 0.2 released
236+
237+1. MagickWand API fully translated
238+2. Added a second demonstration program
239+
240+- 27.12.05 PascalMagick version 0.1 released
241+
242+1. About 80% of the MagickWand API is translated
243+2. The basic demonstration program is working well
244+3. Only the very minimum necessary MagickCode headers were translated
245+
246+- 14.12.05 Began working on a pascal port for the c headers
247+
248+### Bantuan
249+
250+Silahkan kirimkan permintaan bantuan ke Forum Lazarus atau milis Lazarus.
251+
252+---
253+*From the Free Pascal wiki, page "PascalMagick/id", as it stood on 2008-04-19 after a change by Adezm, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history