<table><tr><td style="">gassaf added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13766">View Revision</a></tr></table><br /><div><div><p>I did some more tests and epub_get_data() always returned the correct size.</p>

<p>Original image file from ebook:<br />
<a href="https://phabricator.kde.org/F5980094" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F5980094: A978-1-4302-6653-2_CoverFigure_HTML.jpg</a><br />
Screenshot from Okular, build with</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">/*if(img.height() > maxHeight)
    img = img.scaledToHeight(maxHeight);
if(img.width() > maxWidth)
    img = img.scaledToWidth(maxWidth);*/</pre></div>

<p><a href="https://phabricator.kde.org/F5980120" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F5980120: Without_scaling.png</a></p>

<p>So I would argue Okular does load all images with the correct size. HOWEVER if you use Okulars zoom functionality the image gets blurry again:<br />
<a href="https://phabricator.kde.org/F5980159" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F5980159: without_scaling_blurry.png</a></p>

<p>I don't know for sure what causes this behavior. Maybe this is a QTextDocument issue? I will try to look into this.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13766">https://phabricator.kde.org/D13766</a></div></div><br /><div><strong>To: </strong>gassaf, Okular<br /><strong>Cc: </strong>ngraham, aacid, okular-devel<br /></div>