Skip to content

Commit

Permalink
Update writer.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshineplan committed Jul 15, 2021
1 parent 6dc5552 commit a2d0e4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tiff/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,7 @@ func Encode(w io.Writer, m image.Image, opt *Options) error {
// JPEG compression uses jpeg.Encode to encoding image which writes Gray or YCbCr image.
if compression == cJPEG {
switch m.(type) {
case *image.Gray:
default:
case *image.YCbCr:
// Minimum Requirements for YCbCr Images. (See page 94).
photometricInterpretation = uint32(pYCbCr)
samplesPerPixel = 3
Expand Down

0 comments on commit a2d0e4e

Please sign in to comment.