epuc
if (output == NULL) { FREE(data); return epuc("outofmem", "Out of memory"); }
if (req_comp < 0 || req_comp > 4) return epuc("bad req_comp", "Internal error");
if (!z->img_comp[k].linebuf) { cleanup_jpeg(z); return epuc("outofmem", "Out of memory"); }
if (!output) { cleanup_jpeg(z); return epuc("outofmem", "Out of memory"); }
if (req_comp < 0 || req_comp > 4) return epuc("bad req_comp", "Internal error");
if (get8(s) != 'B' || get8(s) != 'M') return epuc("not BMP", "Corrupt BMP");
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108) return epuc("unknown BMP", "BMP type not supported: unknown");
if (get16le(s) != 1) return epuc("bad BMP", "bad BMP");
if (bpp == 1) return epuc("monochrome", "BMP type not supported: 1-bit");
if (compress == 1 || compress == 2) return epuc("BMP RLE", "BMP type not supported: RLE");
return epuc("bad BMP", "bad BMP");
return epuc("bad BMP", "bad BMP");
if (!out) return epuc("outofmem", "Out of memory");
if (psize == 0 || psize > 256) { FREE(out); return epuc("invalid", "Corrupt BMP"); }
else { FREE(out); return epuc("bad bpp", "Corrupt BMP"); }
return epuc("bad masks", "Corrupt BMP");
return epuc("not PSD", "Corrupt PSD image");
return epuc("wrong version", "Unsupported version of PSD image");
return epuc("wrong channel count", "Unsupported number of channels in PSD image");
return epuc("unsupported bit depth", "PSD bit depth is not 8 bit");
return epuc("wrong color format", "PSD is not in RGB color format");
return epuc("bad compression", "PSD has an unknown compression format");
if (!out) return epuc("outofmem", "Out of memory");
if (at_eof(s)) return epuc("bad file","PIC file too short");
return epuc("bad format","too many packets");
if (at_eof(s)) return epuc("bad file","file too short (reading packets)");
if (packet->size != 8) return epuc("bad format","packet isn't 8bpp");
return epuc("bad format","packet has bad compression type");
if (at_eof(s)) return epuc("bad file","file too short (pure read count)");
if (at_eof(s)) return epuc("bad file","file too short (mixed read count)");
return epuc("bad file","scanline overrun");
if (count>left) return epuc("bad file","scanline overrun");
if (at_eof(s)) return epuc("bad file","file too short (pic header)");
if ((1 << 28) / x < y) return epuc("too large", "Image too large to decode");
if (first) return epuc("no clear code", "Corrupt GIF");
if (avail > 4096) return epuc("too many codes", "Corrupt GIF");
return epuc("illegal code in raster", "Corrupt GIF");
return epuc("illegal code in raster", "Corrupt GIF");
if (g->out == 0) return epuc("outofmem", "Out of memory");
if (g->out == 0) return epuc("outofmem", "Out of memory");
return epuc("bad Image Descriptor", "Corrupt GIF");
return epuc("missing color table", "Corrupt GIF");
return epuc("unknown code", "Corrupt GIF");
if (!f) return epuc("can't fopen", "Unable to open file");
return epuc("unknown image type", "Image not of any known type, or corrupt");
return epuc("unknown image type", "Image not of any known type, or corrupt");
return epuc("outofmem", "Out of memory");