prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  YCbCr JPEG-in-TIFF breaks rio-info
  One creates a YCbCr JPEG-in-TIFF with GDAL using `photometric=YCbCr` and `compress=JPEG` options. But reading the TIFFs tags to get the compression method returns "YCbCr JPEG", a value that's not in `rasterio.enums.Compression`.
  
  Reference: http://www.gdal.org/frmt_gtiff.html
  
  Solution: normalize "YCbCr JPEG" to "JPEG" and add source color space to rio-info's output.
  
  
  </issue>
  <code>
  [start of rasterio/enums.py]
  1 
  2 from enum import Enum, IntEnum
  3 
  4 
  5 class ColorInterp(IntEnum):
  6     undefined=0
  7     grey=1
  8     gray=1
  9     palette=2
  10     red=3
  11     green=4
  12     blue=5
  13     alpha=6
  14     hue=7
  15     saturation=8
  16     lightness=9
  17     cyan=10
  18     magenta=11
  19     yellow=12
  20     black=13
  21 
  22 
  23 class Resampling(Enum):
  24     nearest='NEAREST'
  25     gauss='GAUSS'
  26     cubic='CUBIC'
  27     average='AVERAGE'
  28     mode='MODE'
  29     average_magphase='AVERAGE_MAGPHASE'
  30     none='NONE'
  31 
  32 
  33 class Compression(Enum):
  34     jpeg='JPEG'
  35     lzw='LZW'
  36     packbits='PACKBITS'
  37     deflate='DEFLATE'
  38     ccittrle='CCITTRLE'
  39     ccittfax3='CCITTFAX3'
  40     ccittfax4='CCITTFAX4'
  41     lzma='LZMA'
  42     none='NONE'
  43 
  44 
  45 class Interleaving(Enum):
  46     pixel='PIXEL'
  47     line='LINE'
  48     band='BAND'
  49 
  50 
  51 class MaskFlags(IntEnum):
  52     all_valid=1
  53     per_dataset=2
  54     alpha=4
  55     nodata=8
  56
  [end of rasterio/enums.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/rasterio/enums.py b/rasterio/enums.py
  --- a/rasterio/enums.py
  +++ b/rasterio/enums.py
  @@ -18,6 +18,9 @@
       magenta=11
       yellow=12
       black=13
  +    Y=14
  +    Cb=15
  +    Cr=16
   
   
   class Resampling(Enum):
  @@ -53,3 +56,14 @@
       per_dataset=2
       alpha=4
       nodata=8
  +
  +
  +class PhotometricInterp(Enum):
  +    black='MINISBLACK'
  +    white='MINISWHITE'
  +    rgb='RGB'
  +    cmyk='CMYK'
  +    ycbcr='YCbCr'
  +    cielab='CIELAB'
  +    icclab='ICCLAB'
  +    itulab='ITULAB'
  
verification_info: {"golden_diff": "diff --git a/rasterio/enums.py b/rasterio/enums.py\n--- a/rasterio/enums.py\n+++ b/rasterio/enums.py\n@@ -18,6 +18,9 @@\n     magenta=11\n     yellow=12\n     black=13\n+    Y=14\n+    Cb=15\n+    Cr=16\n \n \n class Resampling(Enum):\n@@ -53,3 +56,14 @@\n     per_dataset=2\n     alpha=4\n     nodata=8\n+\n+\n+class PhotometricInterp(Enum):\n+    black='MINISBLACK'\n+    white='MINISWHITE'\n+    rgb='RGB'\n+    cmyk='CMYK'\n+    ycbcr='YCbCr'\n+    cielab='CIELAB'\n+    icclab='ICCLAB'\n+    itulab='ITULAB'\n", "issue": "YCbCr JPEG-in-TIFF breaks rio-info\nOne creates a YCbCr JPEG-in-TIFF with GDAL using `photometric=YCbCr` and `compress=JPEG` options. But reading the TIFFs tags to get the compression method returns \"YCbCr JPEG\", a value that's not in `rasterio.enums.Compression`.\n\nReference: http://www.gdal.org/frmt_gtiff.html\n\nSolution: normalize \"YCbCr JPEG\" to \"JPEG\" and add source color space to rio-info's output.\n\n", "before_files": [{"content": "\nfrom enum import Enum, IntEnum\n\n\nclass ColorInterp(IntEnum):\n    undefined=0\n    grey=1\n    gray=1\n    palette=2\n    red=3\n    green=4\n    blue=5\n    alpha=6\n    hue=7\n    saturation=8\n    lightness=9\n    cyan=10\n    magenta=11\n    yellow=12\n    black=13\n\n\nclass Resampling(Enum):\n    nearest='NEAREST'\n    gauss='GAUSS'\n    cubic='CUBIC'\n    average='AVERAGE'\n    mode='MODE'\n    average_magphase='AVERAGE_MAGPHASE'\n    none='NONE'\n\n\nclass Compression(Enum):\n    jpeg='JPEG'\n    lzw='LZW'\n    packbits='PACKBITS'\n    deflate='DEFLATE'\n    ccittrle='CCITTRLE'\n    ccittfax3='CCITTFAX3'\n    ccittfax4='CCITTFAX4'\n    lzma='LZMA'\n    none='NONE'\n\n\nclass Interleaving(Enum):\n    pixel='PIXEL'\n    line='LINE'\n    band='BAND'\n\n\nclass MaskFlags(IntEnum):\n    all_valid=1\n    per_dataset=2\n    alpha=4\n    nodata=8\n", "path": "rasterio/enums.py"}]}