title: Working with JP2 Image on Python Pillow
body: <p>I am trying to use python pillow imaging library to process my jp2 images. </p>
  
  <p>I followed these steps:</p>
  
  <p><strong>brew install libjpeg</strong></p>
  
  <p><strong>brew install openjpeg</strong></p>
  
  <p><strong>sudo pip install pillow</strong></p>
  
  <p>I just have problem with .jp2 files. What might be the problem?</p>
  
  <p>Code that I get the error:</p>
  
  <pre><code>from PIL import Image
  im = Image.open("sample_1.jp2")
  im.show()
  </code></pre>
  
  <p>I got following error log when I tried to show the image:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  
    File "/Library/Python/2.7/site-packages/PIL/Image.py", line 1746, in show
      _show(self, title=title, command=command)
  
    File "/Library/Python/2.7/site-packages/PIL/Image.py", line 2501, in _show
      _showxv(image, **options)
  
    File "/Library/Python/2.7/site-packages/PIL/Image.py", line 2506, in _showxv
      ImageShow.show(image, title, **options)
  
    File "/Library/Python/2.7/site-packages/PIL/ImageShow.py", line 51, in show
      if viewer.show(image, title=title, **options):
  
    File "/Library/Python/2.7/site-packages/PIL/ImageShow.py", line 77, in show
      return self.show_image(image, **options)
  
    File "/Library/Python/2.7/site-packages/PIL/ImageShow.py", line 96, in show_image
      return self.show_file(self.save_image(image), **options)
  
    File "/Library/Python/2.7/site-packages/PIL/ImageShow.py", line 92, in save_image
  
      return image._dump(format=self.get_format(image))
  
    File "/Library/Python/2.7/site-packages/PIL/Image.py", line 581, in _dump
      self.load()
  
    File "/Library/Python/2.7/site-packages/PIL/Jpeg2KImagePlugin.py", line 206, in load
  
      ImageFile.ImageFile.load(self)
  
    File "/Library/Python/2.7/site-packages/PIL/ImageFile.py", line 203, in load
      d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  
    File "/Library/Python/2.7/site-packages/PIL/Image.py", line 420, in _getdecoder
      raise IOError("decoder %s not available" % decoder_name)
  
  IOError: decoder jpeg2k not available
  </code></pre>