jpg: ignore sampling factors for grayscale as colormap1() doesnt handle it
This commit is contained in:
parent
a8d7bbeeb3
commit
21b5efe962
1 changed files with 5 additions and 2 deletions
|
@ -328,6 +328,9 @@ readslave(Header *header, int colorspace)
|
|||
nibbles(b[6+3*i+1], &H, &V);
|
||||
if(H<=0 || V<=0)
|
||||
jpgerror(header, "non-positive sampling factor (Hsamp or Vsamp)");
|
||||
/* hack: colormap1() doesnt handle resampling */
|
||||
if(header->Nf == 1)
|
||||
H = V = 1;
|
||||
header->comp[i].H = H;
|
||||
header->comp[i].V = V;
|
||||
header->comp[i].Tq = b[6+3*i+2];
|
||||
|
|
Loading…
Reference in a new issue