pascalmagick / imagemagick - problem lazarus / 8-Other ---------------------------------------------------------------------- musikdusche · 2009-10-21 12:13 Hi There, I have a problem using imagemagick in lazarus. The simple task i want to do is this: Read an image with imagemagick, access the pixels (read and write), and write the image back to disk. The pixel-access is the step where I am stuck. My approach is as follows: Code: [Select]    status := MagickReadImage(wand, 'gradient1.jpg');     // [...] ... errorchecking stuff omitted....     myImage := GetImageFromMagickWand(wand); How do i proceed from here? There are c codesnippets on http://www.imagemagick.org/script/architecture.php#cache suggesting to use either GetAuthenticPixels or GetCacheViewVirtualPixels which are unfortunately not accessible via Pascal/Lazarus, as the are not defined as extern functions. Another idea would be to use MagickGetImagePixels (which exists as extern pascal function) - but it is marked as deprecated on the imagemagick-site (and deservedly so imho because I cant find any good docs how to use the function- arguments in pascal) Is there something I am missing? Any ideas how to solve my problem? Thanks in advance and greetings from Düsseldorf/Germany. (Edit: Changed GetVirtualPixels to GetAuthenticPixels ) ---------------------------------------------------------------------- felipemdc · 2009-10-28 18:02 It would have been better if you post this request here: http://wiki.lazarus.freepascal.org/Talk:PascalMagick Or maybe in the Lazarus bugtracker. I downloaded a newer ImageMagick and they changed the pixel methods in this date, that's why they aren't in the pascal files: 2008-11-18  6.4.5-9 Chris Madison    * Deprecate pixel methods: AcquireImagePixels(), GetImagePixels(), etc.   * New pixel methods: GetVirtualPixels(), GetAuthenticPixels(), etc. I am taking a look about adding the GetAuthenticPixels method ---------------------------------------------------------------------- musikdusche · 2009-10-28 19:18 Thank you for your Reply! I'll have a closer look at your hints the next days! Greetings - Musikdusche. ---------------------------------------------------------------------- felipemdc · 2009-10-29 17:17 MagickCore is too hard to use, use MagickWand instead. I updated the bindings a little bit in subversion so that you can download them like the wiki says. And here is an example program which does direct pixel access: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/imagemagic k/examples/wandpixelaccess.pas?revision=13967&view=markup