The following issue is experienced in Mathematica 11.3 on Linux (debian 9) but I am pretty sure it was already present in version 10 on Linux.

The expression

SameQ[Graphics@Circle[], Graphics@Circle[]]

yields always True, while

SameQ[Image @ Graphics @ Circle[], Image @ Graphics @ Circle[]]

returns a random boolean.

It seems that the algorithm beneath Image contains some random choices and this results in a shaky/wobbly graphics dynamics.

For instance,

Image @ Graphics @ Line@{{0, 0},{1,1}} ~ Table ~ 10 // 
  ImageAdjust @@@ ImageDifference @@@ Partition[#,2,1]&

should return only black images, but on average it returns half of the images with two diagonal lines. Therefore, if we make an animation from the list

Image @ Graphics @ Line@{{0,0},{1,1}} ~ Table ~ 10 

we will see a wobbling line.

Is there a way to force Image to always behave in the same way?

EDIT 1 Switching off Antialiasing globally from the options inspector solves the wobbling problems but, of course, it lowers the quality of all graphics

  • 1
    $\begingroup$ I'm getting different behavior. list = Table[ SameQ[Image@Graphics@Circle[], Image@Graphics@Circle[]], {i, 1000}]; Select[list, # == True &] // Length returns 1000 Trues. (Mac OS 10.13.6,Mathematica 11.13.0) $\endgroup$ – bill s Sep 18 '18 at 23:42
  • $\begingroup$ I have this issue since many years on Linux. Maybe I solved by setting Antialiasing->False in the Style of the graphical objects $\endgroup$ – Fortsaint Sep 18 '18 at 23:48
  • 1
    $\begingroup$ I've seen this same issue on Linux before and reported it to Wolfram. I believe they confirmed it was a bug the 1 year+ I reported it. I'd report it again, to emphasize it be an important issue to be addressed. PS, what version of M are you using? $\endgroup$ – user6014 Sep 19 '18 at 0:59
  • $\begingroup$ Please add version and OS to the question, as this seems to be relevant. (Can't reproduce on Mac either.) $\endgroup$ – Szabolcs Sep 19 '18 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.