Menu

How to get the system to recognise ImageMagick

Anonymous
2019-03-18
2021-03-31
  • Anonymous

    Anonymous - 2019-03-18

    Hi - I've downloaded and installedthe latest version of ImageMagick and I can't get the assertImage_example_test to run. It can't find ImageMagick. Is there somehow to tell SASUnit where ImageMagick sits on my computer?

     
  • Klaus Landwich

    Klaus Landwich - 2019-03-19

    Hi,

    using ImageMagick with SASUnit is a bit tricky.

    First of all the asserts assertText and assertImage are examples of how to use assertExternal to extend the functionality of SASUnit. With assertExtrenal you can use any program running in your operation system, and simply catch its return code in SASUnit.

    ImageMagick in version 6.9.1 ships with a program called compare. It is a standalone exe file. See attachement. That exe file is used by SASUnit. If I remember correctly version 6.9.1 of ImageMagick is the last version that ships with that executable.

    Any furhter questions?

    Regards
    Klaus Landwich

     
  • Klaus Landwich

    Klaus Landwich - 2019-03-19

    Hi,

    I forgot: SASUnit relies on the fact that compare is "registered" in path-variable of your operating system.

    If you can reach an executable for comparing images in ImageMagick, than you can change the call in assertImage.cmd or assertImage.sh if you are using linux

    for /f %%i in ('compare %sasunit_mod% %sasunit_image1% %sasunit_image2% %sasunit_dest% ^2^>^&1') do set RC=%%i
    

    The call to compare must be changed:

    for /f %%i in ('<NEW COMPARE EXECUTABLE> %sasunit_mod% %sasunit_image1% %sasunit_image2% %sasunit_dest% ^2^>^&1') do set RC=%%i
    

    The shell script is located under .../sasunit/saspgm/sasunit/<operating system="">.</operating>

    Regards
    Klaus Landwich

     
  • Anonymous

    Anonymous - 2019-03-19

    Thanks so much Klaus. This is very helpful information. It looks like the latest version (7.0.8-Q16) of ImageMagick uses a slightly different command structure. I had to modify the CMD file to use 'magick compare' and I had to add the path to the system search PATH via the control panel so that when the CMD file runs, the computer finds the software.

    Very cool suite of SAS programming you've done here. Thanks for sharing it with the world!

     
  • Anonymous

    Anonymous - 2020-07-14

    Hi,

    I am facing an issue while using the assertimage in sas unit. Appreciate your support here. I have downloaded the imagemagick version 6.9.11-Q8 and updated the assertimage.cmd file as below.

    for /f %%i in ('"C:\Program Files\ImageMagick-6.9.11-Q8\compare" %sasunit_mod% %sasunit_image1% %sasunit_image2% %sasunit_dest% ^2^>^&1') do set RC=%%i.

    Still I am not getting the expected output. Appreciate your help.

     
  • Klaus Landwich

    Klaus Landwich - 2020-07-15

    In your post March 19th you mentioned that you needed to change the command script to use magick compare as the executable. I can't see that in your last post. There you call compare. Is that the solution? Otherwise I need to install ImageMagick in the latest version (ImageMagick-7.0.10-23-Q16) my self to see what happens.

    Regards
    Klaus

     
  • Klaus Landwich

    Klaus Landwich - 2020-07-15

    I tried it myself.
    Changing compare zo magick compare solved the problem using the current version of ImageMagick.

    Regards
    Klaus

     

    Last edit: Klaus Landwich 2020-07-15
  • Anonymous

    Anonymous - 2020-07-15

    Thanks Klaus. I am a new user to SAS unit and not the one who raised the issue previously. I will install the Imagemagick-7.0.10-23-Q16 and change the command script to magick compare. Hope that will work, else i will get back to you.

    Thanks for the quick response!!!

     
  • Klaus Landwich

    Klaus Landwich - 2020-07-15

    Okay, I couldn't figure that out. All posts were submitted by anonymous in the same thread and without a signature.

    Since Version 7 of ImageMagick the command line did change. So you don't need to update to the newest version. But it will ot harm either.

    Regards
    Klaus

     
  • Anonymous

    Anonymous - 2020-07-15

    Hi Klaus,

    I have installed the imagemagick version "ImageMagick-7.0.10-23-Q16" and changed the assertimage.cmd(we are using windows) file like below.

    for /f %%i in ('magick compare %sasunit_mod% %sasunit_image1% %sasunit_image2% %sasunit_dest% ^2^>^&1') do set RC=%%i.

    But still the sas unit test fails and the link for open image comparison is not working. Is there anything else that i need to update.

    Thanks in advance!!

     
  • Klaus Landwich

    Klaus Landwich - 2020-07-15

    For me Iit worked without any further adjustment.

    How does the environment variable PATH lokk like?
    The first entry should be for ImageMagick-7.0.10-23-Q16 right?
    Is ImageMagick-7.0.10-23-Q16 present in the path-variaile anywehre else?
    If not then you need to add it via control panel.

    Regards
    Klaus

     
  • Anonymous

    Anonymous - 2020-07-15

    I have updated the assertimage.cmd like this

    for /f %%i in ('C:\"Program Files"\ImageMagick-7.0.10-Q16-HDRI\magick.exe compare %sasunit_mod% %sasunit_image1% %sasunit_image2% %sasunit_dest% ^2^>^&1') do set RC=%%
    and it is working now without adding the path via control panel.

    Thanks for your help!!!

     
  • AKHILESH KRISHNAN P U

    Hi sir,
    In linux, how should I update the path in assertimage.sh. I have tried it, but the image comparison report is not coming. Am using the latest version of ImageMagick. Seems like i have done incorrectly. Please guide me....

     
  • Klaus Landwich

    Klaus Landwich - 2021-02-22

    Hi Akhilesh Krishnan,

    to support you I need a bit more information.
    Currently I have no hint where the problem ist located. Is it ImageMagick? Or is it SASUnit?

    Is Image Magick running in your system? There should be a dialogue after installation which helps you to check proper installation.
    Which version of ImageMagick did you install? I'm not sure if the same version is avaliable under all linux distributions.

    Which version of SASUnit didi you download?
    Is there an error message displayed in the corresponding log file for the testcase using assertimage? You can see that in your SASUnit HTML report.

    Please provide me these infos, then I have a chance to guide you.

    Regards
    Klaus Landwich

     
    • Anonymous

      Anonymous - 2021-02-23

      Hi Sir,
      The SAS UNIT version is v2.0.2, OS is red hat linux, imagemagick version is 7. 0.10-61 . Image comparison is showing errors in the html file. The following is the error that comes up- compare: NoDecodeDelegateForThisImageFormat `JPG' @ error/constitute.c/ReadImage/572

       
  • Anonymous

    Anonymous - 2021-02-22

    Hi sir,
    Currently I have downloaded and installed SAS UNIT version v2.0.2, ImageMagick version is 7.0.10-61. OS is red hat linux. There is an error in the html document for the image comparison. When we click on 'Open image comparison' it says that file has been moved. This is the error - 'compare: NoDecodeDelegateForThisImageFormat `JPG' @ error/constitute.c/ReadImage/572.'

    Thanks & Regards
    Akhilesh Krishnan

     
  • Anonymous

    Anonymous - 2021-02-22

    Hi sir,
    ImageMagick version is 7.0.10-61, SAS unit version is v2.0.2, OS is red hat linux. The error message is compare: NoDecodeDelegateForThisImageFormat `JPG' @ error/constitute.c/ReadImage/572.
    Thanks and Regards
    Akhilesh Krishnan

     
  • Klaus Landwich

    Klaus Landwich - 2021-02-23

    Hi Akhilesh Krishnan,

    I searched a bit on the internet and it looks like this is an error message from ImageMagick.
    So the good news is that SASUnit can find ImageMagick.
    This error can be caused by an incorrect command line call to ImageMagick.
    So please post the call to ImageMagick from your assertImage.sh

    Second issue could be a corrupted installation where ImageMagick cannot find link libraries with image definitions.

    But let's take a look at the command line first.

    What I need is the resolved command line so that I can see which parameters are passed to ImageMagick.

    Regards
    Klaus

     

    Last edit: Klaus Landwich 2021-02-25
  • Anonymous

    Anonymous - 2021-02-23

    Hi sir,
    /program/ImageMagick/bin/magick compare $sasunit_mod "$sasunit_image1" "$sasunit_image2" "$sasunit_dest" >/dev/null 2>&1. This is the path I updated in assertimage.sh.

     
  • Klaus Landwich

    Klaus Landwich - 2021-02-25

    Hi Akhilesh Krishnan,

    the command line looks reasonable to me.

    So next step would be to use this command line, fill in the values taht you pass to %assertImage and start the command line in a linux console.
    Perhaps this will show more hints to where to problem is located.

    Regards
    Klaus Landwich

     
    • Anonymous

      Anonymous - 2021-03-02

      Hi Sir,

      SAS unit is working fine now. The problem with assertimage was due to lack of some binaries. The issue that is still not resolved is, assertimage is not working for .tiff extension.

      Thanks & Regards
      Akhilesh Krishnan


      From: Klaus Landwich klandwich@users.sourceforge.net
      Sent: Thursday, February 25, 2021 11:54 AM
      To: [sasunit:discussion] general@discussion.sasunit.p.re.sourceforge.net
      Subject: [sasunit:discussion] How to get the system to recognise ImageMagick

      Hi Akhilesh Krishnan,

      the command line looks reasonable to me.

      So next step would be to use this command line, fill in the values taht you pass to %assertImage and start the command line in a linux console.
      Perhaps this will show more hints to where to problem is located.

      Regards
      Klaus Landwich


      How to get the system to recognise ImageMagickhttps://sourceforge.net/p/sasunit/discussion/general/thread/ece1368cc4/?limit=25#65fb


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/sasunit/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Klaus Landwich

    Klaus Landwich - 2021-03-18

    Hi Akhilesh Krishnan,

    any prgress in this issue?

    Regards
    Klaus Landwich

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.