[bug]$ ls octave octave_bin test_bug.m [bug]$ cd octave [octave]$ hg summary parent: 16301:d39342a19fb8 tip * ov-float.cc (SCALAR_MAPPER): Use gnulib::floorf. branch: default commit: 5435 unknown (clean) update: (current) [octave]$ cd .. [bug]$ cat test_bug.m img = uint8(50*eye(10)); imwrite(img,'test.pgm'); img2 = imread('test.pgm'); sum(sum(img-img2)) [bug]$ octave_bin/bin/octave test_bug.m GNU Octave, version 3.7.2+ Copyright (C) 2013 John W. Eaton and others. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'. Octave was configured for "i686-pc-linux-gnu". Additional information about Octave is available at http://www.octave.org. Please contribute if you find this software useful. For more information, visit http://www.octave.org/get-involved.html Read http://www.octave.org/bugs.html to learn how to submit bug reports. For information about changes from previous versions, type 'news'. warning: your version of GraphicsMagick limits images to 8 bits per pixel ans = 10 [bug]$ gm -version GraphicsMagick 1.3.17 2012-10-13 Q8 http://www.GraphicsMagick.org/ Copyright (C) 2002-2012 GraphicsMagick Group. Additional copyrights and licenses apply to this software. See http://www.GraphicsMagick.org/www/Copyright.html for details. Feature Support: Thread Safe yes Large Files (> 32 bit) yes Large Memory (> 32 bit) no BZIP yes DPS no FlashPix no FreeType yes Ghostscript (Library) no JBIG no JPEG-2000 yes JPEG yes Little CMS yes Loadable Modules no OpenMP yes (201107) PNG yes TIFF yes TRIO no UMEM no WMF yes X11 yes XML yes ZLIB yes Host type: i686-pc-linux-gnu Configured using the command: ./configure '--prefix=/usr' '--with-perl' '--enable-shared' '--disable-static' '--with-gs-font-dir=/usr/share/fonts/Type1' 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CXXFLAGS=-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' Final Build Parameters: CC = gcc -std=gnu99 CFLAGS = -fopenmp -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -pthread CPPFLAGS = -I/usr/include/freetype2 -I/usr/include/libxml2 CXX = g++ CXXFLAGS = -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -pthread LDFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/lib -L/usr/lib LIBS = -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng15 -lwmflite -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lgomp -lpthread [bug]$ gm identify -verbose test.pgm Image: test.pgm Format: PGM (Portable graymap format (gray scale)) Geometry: 10x10 Class: PseudoClass Type: grayscale Depth: 8 bits-per-pixel component Channel Depths: Gray: 8 bits Channel Statistics: Gray: Minimum: 0.00 (0.0000) Maximum: 49.00 (0.1922) Mean: 4.90 (0.0192) Standard Deviation: 14.77 (0.0579) Colors: 256 0: ( 0, 0, 0) black 1: ( 1, 1, 1) #010101 2: ( 2, 2, 2) #020202 3: ( 3, 3, 3) #030303 4: ( 4, 4, 4) #040404 5: ( 5, 5, 5) #050505 6: ( 6, 6, 6) #060606 7: ( 7, 7, 7) #070707 8: ( 8, 8, 8) #080808 9: ( 9, 9, 9) #090909 10: ( 10, 10, 10) #0A0A0A 11: ( 11, 11, 11) #0B0B0B 12: ( 12, 12, 12) #0C0C0C 13: ( 13, 13, 13) #0D0D0D 14: ( 14, 14, 14) #0E0E0E 15: ( 15, 15, 15) #0F0F0F 16: ( 16, 16, 16) #101010 17: ( 17, 17, 17) #111111 18: ( 18, 18, 18) #121212 19: ( 19, 19, 19) #131313 20: ( 20, 20, 20) #141414 21: ( 21, 21, 21) #151515 22: ( 22, 22, 22) #161616 23: ( 23, 23, 23) #171717 24: ( 24, 24, 24) #181818 25: ( 25, 25, 25) #191919 26: ( 26, 26, 26) #1A1A1A 27: ( 27, 27, 27) #1B1B1B 28: ( 28, 28, 28) #1C1C1C 29: ( 29, 29, 29) #1D1D1D 30: ( 30, 30, 30) #1E1E1E 31: ( 31, 31, 31) #1F1F1F 32: ( 32, 32, 32) #202020 33: ( 33, 33, 33) #212121 34: ( 34, 34, 34) #222222 35: ( 35, 35, 35) #232323 36: ( 36, 36, 36) #242424 37: ( 37, 37, 37) #252525 38: ( 38, 38, 38) #262626 39: ( 39, 39, 39) #272727 40: ( 40, 40, 40) #282828 41: ( 41, 41, 41) #292929 42: ( 42, 42, 42) #2A2A2A 43: ( 43, 43, 43) #2B2B2B 44: ( 44, 44, 44) #2C2C2C 45: ( 45, 45, 45) #2D2D2D 46: ( 46, 46, 46) #2E2E2E 47: ( 47, 47, 47) #2F2F2F 48: ( 48, 48, 48) #303030 49: ( 49, 49, 49) #313131 50: ( 50, 50, 50) #323232 51: ( 51, 51, 51) #333333 52: ( 52, 52, 52) #343434 53: ( 53, 53, 53) #353535 54: ( 54, 54, 54) #363636 55: ( 55, 55, 55) #373737 56: ( 56, 56, 56) #383838 57: ( 57, 57, 57) #393939 58: ( 58, 58, 58) #3A3A3A 59: ( 59, 59, 59) #3B3B3B 60: ( 60, 60, 60) #3C3C3C 61: ( 61, 61, 61) #3D3D3D 62: ( 62, 62, 62) #3E3E3E 63: ( 63, 63, 63) #3F3F3F 64: ( 64, 64, 64) #404040 65: ( 65, 65, 65) #414141 66: ( 66, 66, 66) #424242 67: ( 67, 67, 67) #434343 68: ( 68, 68, 68) #444444 69: ( 69, 69, 69) #454545 70: ( 70, 70, 70) #464646 71: ( 71, 71, 71) #474747 72: ( 72, 72, 72) #484848 73: ( 73, 73, 73) #494949 74: ( 74, 74, 74) #4A4A4A 75: ( 75, 75, 75) #4B4B4B 76: ( 76, 76, 76) #4C4C4C 77: ( 77, 77, 77) #4D4D4D 78: ( 78, 78, 78) #4E4E4E 79: ( 79, 79, 79) #4F4F4F 80: ( 80, 80, 80) #505050 81: ( 81, 81, 81) #515151 82: ( 82, 82, 82) #525252 83: ( 83, 83, 83) #535353 84: ( 84, 84, 84) #545454 85: ( 85, 85, 85) #555555 86: ( 86, 86, 86) #565656 87: ( 87, 87, 87) #575757 88: ( 88, 88, 88) #585858 89: ( 89, 89, 89) #595959 90: ( 90, 90, 90) #5A5A5A 91: ( 91, 91, 91) #5B5B5B 92: ( 92, 92, 92) #5C5C5C 93: ( 93, 93, 93) #5D5D5D 94: ( 94, 94, 94) #5E5E5E 95: ( 95, 95, 95) #5F5F5F 96: ( 96, 96, 96) #606060 97: ( 97, 97, 97) #616161 98: ( 98, 98, 98) #626262 99: ( 99, 99, 99) #636363 100: (100,100,100) #646464 101: (101,101,101) #656565 102: (102,102,102) #666666 103: (103,103,103) #676767 104: (104,104,104) #686868 105: (105,105,105) DimGray 106: (106,106,106) #6A6A6A 107: (107,107,107) #6B6B6B 108: (108,108,108) #6C6C6C 109: (109,109,109) #6D6D6D 110: (110,110,110) #6E6E6E 111: (111,111,111) #6F6F6F 112: (112,112,112) #707070 113: (113,113,113) #717171 114: (114,114,114) #727272 115: (115,115,115) #737373 116: (116,116,116) #747474 117: (117,117,117) #757575 118: (118,118,118) #767676 119: (119,119,119) #777777 120: (120,120,120) #787878 121: (121,121,121) #797979 122: (122,122,122) #7A7A7A 123: (123,123,123) #7B7B7B 124: (124,124,124) #7C7C7C 125: (125,125,125) #7D7D7D 126: (126,126,126) gray 127: (127,127,127) #7F7F7F 128: (128,128,128) fractal 129: (129,129,129) #818181 130: (130,130,130) #828282 131: (131,131,131) #838383 132: (132,132,132) #848484 133: (133,133,133) #858585 134: (134,134,134) #868686 135: (135,135,135) #878787 136: (136,136,136) #888888 137: (137,137,137) #898989 138: (138,138,138) #8A8A8A 139: (139,139,139) #8B8B8B 140: (140,140,140) #8C8C8C 141: (141,141,141) #8D8D8D 142: (142,142,142) #8E8E8E 143: (143,143,143) #8F8F8F 144: (144,144,144) #909090 145: (145,145,145) #919191 146: (146,146,146) #929292 147: (147,147,147) #939393 148: (148,148,148) #949494 149: (149,149,149) #959595 150: (150,150,150) #969696 151: (151,151,151) #979797 152: (152,152,152) #989898 153: (153,153,153) #999999 154: (154,154,154) #9A9A9A 155: (155,155,155) #9B9B9B 156: (156,156,156) #9C9C9C 157: (157,157,157) #9D9D9D 158: (158,158,158) #9E9E9E 159: (159,159,159) #9F9F9F 160: (160,160,160) #A0A0A0 161: (161,161,161) #A1A1A1 162: (162,162,162) #A2A2A2 163: (163,163,163) #A3A3A3 164: (164,164,164) #A4A4A4 165: (165,165,165) #A5A5A5 166: (166,166,166) #A6A6A6 167: (167,167,167) #A7A7A7 168: (168,168,168) #A8A8A8 169: (169,169,169) DarkGray 170: (170,170,170) #AAAAAA 171: (171,171,171) #ABABAB 172: (172,172,172) #ACACAC 173: (173,173,173) #ADADAD 174: (174,174,174) #AEAEAE 175: (175,175,175) #AFAFAF 176: (176,176,176) #B0B0B0 177: (177,177,177) #B1B1B1 178: (178,178,178) #B2B2B2 179: (179,179,179) #B3B3B3 180: (180,180,180) #B4B4B4 181: (181,181,181) #B5B5B5 182: (182,182,182) #B6B6B6 183: (183,183,183) #B7B7B7 184: (184,184,184) #B8B8B8 185: (185,185,185) #B9B9B9 186: (186,186,186) #BABABA 187: (187,187,187) #BBBBBB 188: (188,188,188) #BCBCBC 189: (189,189,189) #BDBDBD 190: (190,190,190) #BEBEBE 191: (191,191,191) #BFBFBF 192: (192,192,192) silver 193: (193,193,193) #C1C1C1 194: (194,194,194) #C2C2C2 195: (195,195,195) #C3C3C3 196: (196,196,196) #C4C4C4 197: (197,197,197) #C5C5C5 198: (198,198,198) #C6C6C6 199: (199,199,199) #C7C7C7 200: (200,200,200) #C8C8C8 201: (201,201,201) #C9C9C9 202: (202,202,202) #CACACA 203: (203,203,203) #CBCBCB 204: (204,204,204) #CCCCCC 205: (205,205,205) #CDCDCD 206: (206,206,206) #CECECE 207: (207,207,207) #CFCFCF 208: (208,208,208) #D0D0D0 209: (209,209,209) #D1D1D1 210: (210,210,210) #D2D2D2 211: (211,211,211) LightGray 212: (212,212,212) #D4D4D4 213: (213,213,213) #D5D5D5 214: (214,214,214) #D6D6D6 215: (215,215,215) #D7D7D7 216: (216,216,216) #D8D8D8 217: (217,217,217) #D9D9D9 218: (218,218,218) #DADADA 219: (219,219,219) #DBDBDB 220: (220,220,220) gainsboro 221: (221,221,221) #DDDDDD 222: (222,222,222) #DEDEDE 223: (223,223,223) #DFDFDF 224: (224,224,224) #E0E0E0 225: (225,225,225) #E1E1E1 226: (226,226,226) #E2E2E2 227: (227,227,227) #E3E3E3 228: (228,228,228) #E4E4E4 229: (229,229,229) #E5E5E5 230: (230,230,230) #E6E6E6 231: (231,231,231) #E7E7E7 232: (232,232,232) #E8E8E8 233: (233,233,233) #E9E9E9 234: (234,234,234) #EAEAEA 235: (235,235,235) #EBEBEB 236: (236,236,236) #ECECEC 237: (237,237,237) #EDEDED 238: (238,238,238) #EEEEEE 239: (239,239,239) #EFEFEF 240: (240,240,240) #F0F0F0 241: (241,241,241) #F1F1F1 242: (242,242,242) #F2F2F2 243: (243,243,243) #F3F3F3 244: (244,244,244) #F4F4F4 245: (245,245,245) WhiteSmoke 246: (246,246,246) #F6F6F6 247: (247,247,247) #F7F7F7 248: (248,248,248) #F8F8F8 249: (249,249,249) #F9F9F9 250: (250,250,250) #FAFAFA 251: (251,251,251) #FBFBFB 252: (252,252,252) #FCFCFC 253: (253,253,253) #FDFDFD 254: (254,254,254) #FEFEFE 255: (255,255,255) white Filesize: 113 Interlace: No Orientation: Unknown Background Color: white Border Color: #DFDFDF Matte Color: #BDBDBD Compose: Over Dispose: Undefined Iterations: 0 Compression: Undefined Signature: 92f5520f2aa268dbd55c584c68ade10b5b94f7ffd07ccb3510aed035c6c25972 Tainted: False User Time: 0.010u