Skip to content

Test fails with cryptic error message if fresh image is larger then baseline image (imagemagick) #75

Description

@moellering

Expected Output

assertSameFiles Needle should either state that the images are similar or that they are not.

Actual Output

ValueError: ("could not convert string to float: b'idt'") thrown at /needle/engines/imagemagick_engine.py:24

  • Checking the compare_stderr in that situation yields compare: width or height exceeds limit [...]
  • Running the actual command stored incompare_cmd in a console yields the same error
  • However I don't think this this an imagemagick bug since the intention -subimage-search is to find a smaller image inside a bigger one.

Reproduce

  1. create an images 1.png and 2.png where 2.png is bigger then 1.png
  2. run magick compare -metric RMSE -dissimilarity-threshold 1.0 -subimage-search 1.png 2.png d.png
  3. get compare: width or height exceeds limit '1.png' @ error/cache.c/OpenPixelCache/3491.

Suggestions

We could order the images by size. However I guess that will not fix the problem is one image is wider but not as high as the other one.

Contribution

I tried to run the tests but many fail on my system. I'm not sure if that is a problem with the tests or with me not using the right commands. I created an issue #74
If this issue is solved I'd be happy to implement my the reordering of the images.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions