Changeset View
Changeset View
Standalone View
Standalone View
plugins/impex/xcf/3rdparty/xcftools/xcf-general.c
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 46 | { | |||
---|---|---|---|---|---|
55 | switch(type) { | 55 | switch(type) { | ||
56 | case PROP_COLORMAP: | 56 | case PROP_COLORMAP: | ||
57 | { | 57 | { | ||
58 | uint32_t ncolors ; | 58 | uint32_t ncolors ; | ||
59 | xcfCheckspace(ptr+8,4,"(colormap length)"); | 59 | xcfCheckspace(ptr+8,4,"(colormap length)"); | ||
60 | ncolors = xcfL(ptr+8) ; | 60 | ncolors = xcfL(ptr+8) ; | ||
61 | if( ncolors > 256 ) | 61 | if( ncolors > 256 ) | ||
62 | FatalBadXCF("Colormap has %" PRIu32 " entries",ncolors); | 62 | FatalBadXCF("Colormap has %" PRIu32 " entries",ncolors); | ||
63 | /* Surprise! Some older verion of the Gimp computed the wrong length | 63 | /* Surprise! Some older version of the Gimp computed the wrong length | ||
64 | * word, and the _reader_ always just reads three bytes per color | 64 | * word, and the _reader_ always just reads three bytes per color | ||
65 | * and ignores the length tag! Duplicate this so we too can read | 65 | * and ignores the length tag! Duplicate this so we too can read | ||
66 | * the buggy XCF files. | 66 | * the buggy XCF files. | ||
67 | */ | 67 | */ | ||
68 | length = minlength = 4+3*ncolors; | 68 | length = minlength = 4+3*ncolors; | ||
69 | break; | 69 | break; | ||
70 | } | 70 | } | ||
71 | case PROP_COMPRESSION: minlength = 1; break; | 71 | case PROP_COMPRESSION: minlength = 1; break; | ||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |