|
From: doug s. <hig...@ho...> - 2013-05-29 15:09:45
|
>> I haven't got the .rgb file naming worked out yet - I did it wrong in win32, and I want to get them harmonized. >> > I made changes to avoid converting the .rgb to .png for testing on linux. > But it looks like there's no widthxheight header information being written, and graphicsmagick installed on ubuntu asks for that information if I go > gm display 1_wrl.0001.rgb > (whereas gm display 1_wrl.0001.png displays the image without having to ask) > When I look for an .rgb format, SGI has a .rgb format, and they specify a header. > ftp://ftp.sgi.com/graphics/grafica/sgiimage.html > http://www.fileformat.info/format/sgiimage/egff.htm > and the Snapshot.c code doesn't write a header - just the body, and looks like not in the byte order of the .sgi format. > freewrl linux uses imlib2 for reading images. Perhaps imlib2 could be used to save the snapshot images directly to .png, and in such a way that there's no compression, if compression is a problem. > http://docs.enlightenment.org/api/imlib2/html/index.html > Or during the current image conversion method, specify no compression, if compression is a problem. . I'm finding the .pngs show different when using perl compare, but show identical when using the graphicsmagick compare function: . 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) . Hypothesis: the difference is in the .png header information, which may include things like date stamp or name of file, and would show different in a perl file binary compare(,) but not in a gm image compare that compares just the pixel data. . So I'll leave the linux code as it was - converting .rgb to .png. -Doug |