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

version» Context lines:

pike.git/lib/modules/Standards.pmod/IIM.pmod:291:    //werror ("length: %O\n", short_value(length_s));       string data = fd->read((length-2) & 0xffff);    if (app == "\xff\xed") // APP14 Photoshop    {    //werror("data: %O\n", data);    photoshop_data = data;    break;    }    } while (1); +  } else if (marker == "8B") { +  // May be a native PSD file. It should start with "8BPS\0\1" to be valid. +  string marker2 = fd->read(4); +  if (marker2 == "PS\0\1") { +  photoshop_data = "8BPS\0\1" + fd->read(); +  }    } else {    //werror("unknown marker: %O neither JPEG nor Postscript\n", marker);    return ([]);    }       if (!sizeof(photoshop_data)) return ([]);       mapping res = decode_photoshop_data(photoshop_data);       if (sizeof(res)) {