|
|
@ -755,7 +755,6 @@ namespace ImageProcessorCore.Formats.Jpg |
|
|
switch (nComp) |
|
|
switch (nComp) |
|
|
{ |
|
|
{ |
|
|
case 1: |
|
|
case 1: |
|
|
{ |
|
|
|
|
|
// If a JPEG image has only one component, section A.2 says "this data
|
|
|
// If a JPEG image has only one component, section A.2 says "this data
|
|
|
// is non-interleaved by definition" and section A.2.2 says "[in this
|
|
|
// is non-interleaved by definition" and section A.2.2 says "[in this
|
|
|
// case...] the order of data units within a scan shall be left-to-right
|
|
|
// case...] the order of data units within a scan shall be left-to-right
|
|
|
@ -770,10 +769,8 @@ namespace ImageProcessorCore.Formats.Jpg |
|
|
h = 1; |
|
|
h = 1; |
|
|
v = 1; |
|
|
v = 1; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
case 3: |
|
|
case 3: |
|
|
{ |
|
|
|
|
|
// For YCbCr images, we only support 4:4:4, 4:4:0, 4:2:2, 4:2:0,
|
|
|
// For YCbCr images, we only support 4:4:4, 4:4:0, 4:2:2, 4:2:0,
|
|
|
// 4:1:1 or 4:1:0 chroma subsampling ratios. This implies that the
|
|
|
// 4:1:1 or 4:1:0 chroma subsampling ratios. This implies that the
|
|
|
// (h, v) values for the Y component are either (1, 1), (1, 2),
|
|
|
// (h, v) values for the Y component are either (1, 1), (1, 2),
|
|
|
@ -806,10 +803,8 @@ namespace ImageProcessorCore.Formats.Jpg |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
case 4: |
|
|
case 4: |
|
|
{ |
|
|
|
|
|
// For 4-component images (either CMYK or YCbCrK), we only support two
|
|
|
// For 4-component images (either CMYK or YCbCrK), we only support two
|
|
|
// hv vectors: [0x11 0x11 0x11 0x11] and [0x22 0x11 0x11 0x22].
|
|
|
// hv vectors: [0x11 0x11 0x11 0x11] and [0x22 0x11 0x11 0x22].
|
|
|
// Theoretically, 4-component JPEG images could mix and match hv values
|
|
|
// Theoretically, 4-component JPEG images could mix and match hv values
|
|
|
@ -837,7 +832,6 @@ namespace ImageProcessorCore.Formats.Jpg |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
comp[i].h = h; |
|
|
comp[i].h = h; |
|
|
comp[i].v = v; |
|
|
comp[i].v = v; |
|
|
|