title: "Requested Bitrate is too small" - displaying JPEG2000 on Android
body: <p>I'm trying to display jpeg2000 image (jp2) on Android. I'm using Xamarin and <strong>Csj2k</strong> library (c# port of <strong>jj2000</strong> library). </p>
  
  <pre><code>CSJ2K.J2kImage.FromBytes(ImageBytes).As&lt;Bitmap&gt;()
  </code></pre>
  
  <p><strong>On Android 7.0 everything works OK.</strong> 
  But on Android 9.0 I'm receiving following error: 
  <strong>"Requested bitrate is too small"</strong></p>
  
  <blockquote>
    <p>$exception  System.InvalidOperationException: Requested bitrate is too small.</p>
    
    <p>at CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent..ctor</p>
    
    <p>at CSJ2K.j2k.codestream.reader.BitstreamReaderAgent.createInstance </p>
    
    <p>at CSJ2K.J2kImage.FromStream </p>
    
    <p>at CSJ2K.J2kImage.FromBytes*  </p>
  </blockquote>
  
  <p>As I am looking on implementation of library, this condition is a problem:</p>
  
  <pre><code>            // If cannot even read the first tile-part
              if (anbytes &gt; tnbytes)
                  throw new System.ApplicationException("Requested bitrate is too small.");
  </code></pre>
  
  <p>I tried to solve problem with custom parameters, but they're hard to understand for me - without any effects.</p>