Recent

Author Topic: PascalMagick-ImageMagick versions? CORE_RL_wand_.dll/CORE_RL_MagickWand_.dll ...  (Read 617 times)

PaulANormanNZ

  • Full Member
  • ***
  • Posts: 114
Hi,

Quote
PascalMagick: Please send help requests to the Lazarus Forum or the Lazarus mailing list

I have been trying to follow:-

https://wiki.freepascal.org/PascalMagick#Demonstration_program_1

... through.

I'm posting here as the link above says what I'm dealing with is now an FPC maintained package.

I am on:
Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 x86_64-win64-win32/win64

I am compiling under 64bit and was wondering which version number of ImageMagick 64(?)/32(?)bit the FPC package for PascalMagick expects?

The guidence on the above page is not specific, just says get the ImageMagick binaries (.dll version of course), if you just do that from the link provided, you will get a "CORE_RL_wand_.dll" missing error when you compile and run the example project's exe from the command prompt.

Of course current binary DLL releases of ImageMagick e.g. ImageMagick-7.1.0-Q16-HDRI provide not CORE_RL_wand_.dll but CORE_RL_MagickWand_.dll and so on.
(Is just a matter of renaming one thing, or would it be much more complex than that?)

So I tried a previous version of ImageMagick I had for an older set of projects (LaTeX not Lazarus) 
ImageMagick-6.5.6-Q16
with a modified path in a batch file to launch it . . .

Code: Text  [Select][+][-]
  1. REM path=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI;%path%
  2. path=G:\LaTeXPortable\LatexUtils\ImageMagick-6.5.6-Q16;%path%
  3. echo %path%
  4. pause
  5. wanddemo
  6.  

. . . and I'm now free of the "CORE_RL_wand_.dll missing error" but I get no further with this simplistic message now appearing...

Quote
The application was unable to start correctly (Oxc000007b). Click OK to close the application.

I've explored this link . . .

[FIX] How to fix the 0xc000007b error!

https://answers.microsoft.com/en-us/windows/forum/all/fix-how-to-fix-the-0xc000007b-error/7ceb6950-306b-441e-994d-a353a14b3bca

Quote
MichalZakrzewskiWro

I followed every single instruction in this topic, but nevertheless my game doesn't start...

Dont know what to do next.

Please help :(

<End of Thread!>

... Hmm,
Michal Zakrzewski never got an answer on an answers.microsoft.com Forum, what hope to we have? :-)

And so I am also a bit shy of making 2017 reccomended alterations to my 2022 installation,
and such things would be much too comlex for my Users downstream I think?

Wondering if this is at all fixable—beyond the FPC package being updated or ImagickMagick version(s)ed somehow,
which I assume no one has time, or in the alternative the expertese, to do.

So I'm having to look at just having Lazarus shelling out to a portable installation of ImageMagick?

But would miss TStream(s) etc and will be finding things taking a lot longer of course.

Any help/advice appreciated please?

Kind regards,
Paul

« Last Edit: July 13, 2022, 09:35:56 am by PaulANormanNZ »

sstvmaster

  • Sr. Member
  • ****
  • Posts: 292
I think the error comes from wrong bitness of the dll or your app.

Lazarus 64bit -> 64bit dll
Lazarus 32bit -> 32bit dll
greetings Maik

Windows 10,
- Lazarus 2.2.4 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.5 (fixes) + fpc 3.3.1 (main/trunk)

PaulANormanNZ

  • Full Member
  • ***
  • Posts: 114
Thanks for that sstvmaster, I will explore it.

But first, does any one know which version number of ImageMagick (the highest number it can even?) that PascalMgick is intended to work with please?

Paul

PaulANormanNZ

  • Full Member
  • ***
  • Posts: 114
(I've added a note below about installing ImageMagick from the Command line and options there.)

Ok, working thourgh this I have found that the following basically works :-)

Using ImageMagic's archive:

https://legacy.imagemagick.org/script/download.php#windows

I obtained Specifically:
ImageMagick-6.9.12-Q16-HDRI - ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exe
https://imagemagick.org/archive//binaries/ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exe

Installing without doing file associations or anything else effectively created it as portable with dlls

If it is installed from the command line, rather than from just clicking on it in Windows FileExplorer, you can get help for extra installation options ...

Code: Text  [Select][+][-]
  1. ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exe /?

A website is mentioned there with commandline options ...

https://jrsoftware.org/ishelp/index.php?topic=setupcmdline

Which gives a lead to:

https://jrsoftware.org/ishelp/index.php?topic=technotes

One of the option combinations found in its listings is:
Code: Text  [Select][+][-]
  1.  /PORTABLE=1

So –
Code: Text  [Select][+][-]
  1.  ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exe /PORTABLE=1
(You can add more options, or handle many of them later in the installer GUI.)

This /PORTABLE=1 may pertain to the instaler itself, but also seems to help reomve any deeper things being placed in Widows system, (some one with more knowledge could chime in here).

I think you end up with a redistributable portable version wioth dlls in it.

Then casting around on the internet and also using:

Reference on Environements variables:
https://www.imagemagick.org/script/resources.php

I altered my batch file as follows. . .

Code: Text  [Select][+][-]
  1.  path=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI;%path%
  2.  set MAGICK_HOME=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI
  3.  set MAGICK_CODER_MODULE_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI\modules\coders
  4.  
  5. REM you might get away with not using this one . . .
  6. set DYLD_LIBRARY_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI\lib
  7.  
  8. wanddemo
  9.  

As said it works, Jpeg attached :-) I was a little surprised at the outcome, but the original PNG is of course untouched and looks the same.

But still I wonder, is this a robust solution?

I tried this just to make sure somehow 7.1 hadn't solved its own problems . . .

Code: Text  [Select][+][-]
  1. path=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI;%path%
  2. set MAGICK_HOME=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI\
  3. set MAGICK_CODER_MODULE_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI\modules\coders
  4. set DYLD_LIBRARY_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI\lib
  5.  
  6. wanddemo

 . . . but although I did not yet get the original 7.1 error regarding: "CORE_RL_wand_.dll"

— I instead got a PNG delegate error, which I can not seem to resolve, and I asume that I won't(?).

How would I bury the necessary ImageMagick-6.9.12 things (environment variables and path to ImageMagick" in my batch file, into a Lazarus GUI Project settings for independant execution please?
(I realise the for RUN debuging, I can point to the dlls,
but if I want to leave things effectively portable, how is that done for an exeutable, or does my .exe have to be called from a batch file as above to avoid altering system settings?)

TIA
Paul
« Last Edit: July 15, 2022, 07:39:01 am by PaulANormanNZ »

PaulANormanNZ

  • Full Member
  • ***
  • Posts: 114
I've added a note below about installing ImageMagick from the Command line and options there.

And put a reference to this thread in the Wiki

https://wiki.lazarus.freepascal.org/PascalMagick

PaulANormanNZ

  • Full Member
  • ***
  • Posts: 114
It looks like PascalMagick being presently limited to nothing above ImageMagick-6.9.12,
 may mean that it can not work with Gimp .xcf files created in or after Gimp version 2.10,
where Gimp changed their layer format?

I tried, and an error was thrown.

PaulANormanNZ

  • Full Member
  • ***
  • Posts: 114
I'm leaving ImageMagick behind now, and want to look into FreePascal's own native image capabilities, and any other good options.

I'd very much prefer OpenSource, but has any one had experience with:
 
XnView's commandline tool ncovnert or equivalent?

 https://www.xnview.com/en/nconvert/

Or is anyone aware of any other good options – preferably Open Source?

Thanks,
Paul

Thaddy

  • Hero Member
  • *****
  • Posts: 11910
I would simply use the packages/imageMagic that is bundled as standard with FreePascal. That reads XCF files too.
No PascalMagic.
Black themes should be banned.

 

TinyPortal © 2005-2018