|
From: doug s. <hig...@ho...> - 2013-06-02 23:24:15
|
>> . >> gm compare -metric mse fixture/1_wrl.0001.png playback/1_wrl.0001.png >> (shows a statistical table with 0.00000 difference) >> gm compare fixture/1_wrl.0001.png playback/1_wrl.0001.png -file diff.png -highlight-color purple -highlight-style Assign >> # win32: gm convert diff.bmp win: >> # linux: gm display diff.png >> gm display diff.png >> (shows a .png snapshot image with any different pixels highlighted in purple - no differences) >> . > . > in win32 I got a gm compare difference when I did > freewrl 1.wrl -R -F > freewrl 1.wrl -P > to generate the fixture while recording. I got a few pixels different. > . > When I did it in 3 steps: > freewrl 1.wrl -R > freewrl 1.wrl -F > freewrl 1.wrl -P > Then the fixture and playback images are identical. > . > Hypotheses: > H0: it has something to do with the cursor, which is over the window during -R > H1: random - need to do more tests to see if it happens again > . On linux, for -F --fixture and -P --playback testing modes only, I changed Snapshot.c to save to windows .bmp format which has a 58 byte header, and stores uncompressed -instead of .rgb which has no header, or .png which by default gets some compression. GraphicsMagick on linux will display it: gm display 1_wrl.0001.bmp There's no date stamp or filename stored in the .bmp header, so 2 test fixtures should not differ in the header, so perl compare should work as well as gm compare. And any differences won't be due to compression since there isn't any. -Doug |