pike.git / lib / modules / Standards.pmod / IIM.pmod

version» Context lines:

pike.git/lib/modules/Standards.pmod/IIM.pmod:1:   // Extracts IPTC Information Interchange Model data (aka "IPTC   // headers") from JPEG files created with PhotoShop.   //   // http://www.iptc.org/IIM/   // - // $Id: IIM.pmod,v 1.7 2007/03/01 14:49:53 grubba Exp $ + // $Id: IIM.pmod,v 1.8 2008/06/28 16:36:59 nilsson Exp $   //   // Anders Johansson & Henrik Grubbström      #pike __REAL_VERSION__      mapping(int:mapping(int:string)) fields =    ([    1: ([ // ENVELOPE RECORD    0: "model version",    5: "destinatino",
pike.git/lib/modules/Standards.pmod/IIM.pmod:106:    9: ([ // POST-OBJECTDATA DESCRIPTOR    10: "confirmed objectdata size",    ])    ]);      mapping(int:multiset(int)) binary_fields = ([    1: (<20, 22>),    2: (<0>),   ]);    - static int short_value(string str) + protected int short_value(string str)   {    return (str[0]<<8)|str[1];    //return (str[1]<<8)|str[0];   }    - static mapping(string:string|array(string)) decode_photoshop_data(string data) + protected mapping(string:string|array(string)) decode_photoshop_data(string data)   {    mapping(string:string|array(string)) res = ([]);       // 0x0404 is IPTC IIM    array blocks = (data / "8BIM\4\4")[1..];    if (!sizeof(blocks)) {    werror("No 8BIM/IPTC IIM markers found in data\n");    return res;    }    //werror("blocks: %O\n", blocks);
pike.git/lib/modules/Standards.pmod/IIM.pmod:362:    foreach(res; string key; array(string) vals) {    res[key] = map(vals,    lambda(string val, object decoder) {    return decoder->feed(val)->drain();    }, decoder);    }    }       return res;   } +