Path: blob/master/thirdparty/libjpeg-turbo/src/cderror.h
9904 views
/*1* cderror.h2*3* This file was part of the Independent JPEG Group's software:4* Copyright (C) 1994-1997, Thomas G. Lane.5* Modified 2009-2017 by Guido Vollbeding.6* libjpeg-turbo Modifications:7* Copyright (C) 2021, 2024, D. R. Commander.8* For conditions of distribution and use, see the accompanying README.ijg9* file.10*11* This file defines the error and message codes for the cjpeg/djpeg12* applications. These strings are not needed as part of the JPEG library13* proper.14* Edit this file to add new codes, or to translate the message strings to15* some other language.16*/1718/*19* To define the enum list of message codes, include this file without20* defining macro JMESSAGE. To create a message string table, include it21* again with a suitable JMESSAGE definition (see jerror.c for an example).22*/23#ifndef JMESSAGE24#ifndef CDERROR_H25#define CDERROR_H26/* First time through, define the enum list */27#define JMAKE_ENUM_LIST28#else29/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */30#define JMESSAGE(code, string)31#endif /* CDERROR_H */32#endif /* JMESSAGE */3334#ifdef JMAKE_ENUM_LIST3536typedef enum {3738#define JMESSAGE(code, string) code,3940#endif /* JMAKE_ENUM_LIST */4142JMESSAGE(JMSG_FIRSTADDONCODE = 1000, NULL) /* Must be first entry! */4344JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")45JMESSAGE(JERR_BMP_BADDEPTH, "Only 8-, 24-, and 32-bit BMP files are supported")46JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")47JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")48JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")49JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")50JMESSAGE(JERR_BMP_EMPTY, "Empty BMP image")51JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")52JMESSAGE(JERR_BMP_OUTOFRANGE, "Numeric value out of range in BMP file")53JMESSAGE(JTRC_BMP, "%ux%u %d-bit BMP image")54JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")55JMESSAGE(JTRC_BMP_OS2, "%ux%u %d-bit OS2 BMP image")56JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")5758JMESSAGE(JERR_GIF_BUG, "GIF output got confused")59JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")60JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")61JMESSAGE(JERR_GIF_EMPTY, "Empty GIF image")62JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")63JMESSAGE(JERR_GIF_NOT, "Not a GIF file")64JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")65JMESSAGE(JTRC_GIF_BADVERSION,66"Warning: unexpected GIF version number '%c%c%c'")67JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")68JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")69JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")70JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")71JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")72JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")7374JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")75JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")76JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")77JMESSAGE(JERR_PPM_OUTOFRANGE, "Numeric value out of range in PPM file")78JMESSAGE(JTRC_PGM, "%ux%u PGM image (maximum color value = %u)")79JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image (maximum color value = %u)")80JMESSAGE(JTRC_PPM, "%ux%u PPM image (maximum color value = %u)")81JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image (maximum color value = %u)")8283JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")84JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")85JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")86JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")87JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")88JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")89JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")9091JMESSAGE(JERR_BAD_CMAP_FILE,92"Color map file is invalid or of unsupported format")93JMESSAGE(JERR_TOO_MANY_COLORS,94"Output file format cannot handle %d colormap entries")95JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")96#ifdef TARGA_SUPPORTED97JMESSAGE(JERR_UNKNOWN_FORMAT,98"Unrecognized input file format --- perhaps you need -targa")99#else100JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")101#endif102JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")103104#ifdef JMAKE_ENUM_LIST105106JMSG_LASTADDONCODE107} ADDON_MESSAGE_CODE;108109#undef JMAKE_ENUM_LIST110#endif /* JMAKE_ENUM_LIST */111112/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */113#undef JMESSAGE114115116