[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gwenview-devel
Subject:    Re: Review Request 113397: RAW preview in gwenview
From:       "Martin Kyral" <martin.kyral () gmail ! com>
Date:       2013-10-29 10:19:00
Message-ID: 20131029101900.19583.43561 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Oct. 23, 2013, 1:20 p.m., Aurélien Gâteau wrote:
> > lib/thumbnailprovider/thumbnailgenerator.cpp, line 62
> > <http://git.reviewboard.kde.org/r/113397/diff/1/?file=205135#file205135line62>
> > 
> > Why is this needed?
> 
> Martin Kyral wrote:
> the bytearray containing format hint seems to be mandatory:
> 
> (snip from qimagereader.h)
> explicit QImageReader(QIODevice *device, const QByteArray &format = QByteArray());
> explicit QImageReader(const QString &fileName, const QByteArray &format = \
> QByteArray()); 
> Martin Kyral wrote:
> Maybe I missed the point - I copied the code from loadingdocumentimpl.cpp thinking \
> that obtaining the file type via QImageReader is better/more reliable than just \
> taking the file extension. 
> Martin Kyral wrote:
> Hm, bad memory :-/ I realized that the QImageReader stuff was there w/o the format \
> hint. Deleting the line. Sorry for confusing comments...

In the end the format hint is necessary. Without it, QImageReader considers raw files \
to be tiff and processing fails (the raw code block is not entered).


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113397/#review42211
-----------------------------------------------------------


On Oct. 25, 2013, 9:47 a.m., Martin Kyral wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113397/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2013, 9:47 a.m.)
> 
> 
> Review request for Gwenview and Aurélien Gâteau.
> 
> 
> Repository: gwenview
> 
> 
> Description
> -------
> 
> This is a review of patch enabling raw support in gwenview. It uses KDcraw to \
> extract the embedded jpeg preview (most of the raw formats contain it for the \
> purposes of quick viewing the photos on the camera display) so it is fast, \
> implementing was quite easy and theoretically it enables gwenview to support \
> everything dcraw supports (practically we need to test more formats). The patch \
> does not perform demosaicing and I don't think it shall - digikam, darktable or \
> rawtherapee are much more suited for developing the 'digital negatives'. 
> The patch fixes BZ#158788
> 
> The patch enables support for Nikon NEF and NRW formats, Canon's CR2, Pentax PEF, \
> Sony ARW and Adobe DNG. If you want to try another format, just adding it's MIME \
> type to the list in lib/mimetypeutils.cpp shall be enough. 
> The patch as is contains just the basic functionality (generating proper thumbnails \
> and viewing the raw images incl. EXIF metadata), but it is well usable. However, \
> there is still a lot of stuff to do (see the commit message in the patch) so I'd \
> appreciate any help. 
> 
> Diffs
> -----
> 
> CMakeLists.txt 4dafb7e 
> lib/CMakeLists.txt c6ffe14 
> lib/document/loadingdocumentimpl.cpp fbad8ff 
> lib/glibraw.h PRE-CREATION 
> lib/glibraw.cpp PRE-CREATION 
> lib/gwenviewconfig.kcfg 231fd5e 
> lib/mimetypeutils.cpp 546346f 
> lib/thumbnailprovider/thumbnailgenerator.cpp 8b98904 
> 
> Diff: http://git.reviewboard.kde.org/r/113397/diff/
> 
> 
> Testing
> -------
> 
> Tested on some sample raw files taken from the camera reviews on \
> http://www.photographyblog.com/ and bunch of my own photos. Nikon (tried D50, D70s, \
> D90, D800 and Coolpix P7000), Canon (tried 7D, 5D Mark3 and 6D) and Pentax (K-X, \
> K30) have the preview full-res, while Sony raw files (A900, A850, A58, Nex 3, Nex \
> 6) have only 1616x1050. 
> 
> Thanks,
> 
> Martin Kyral
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/113397/">http://git.reviewboard.kde.org/r/113397/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On October 23rd, 2013, 1:20 p.m. UTC, <b>Aurélien \
Gâteau</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/113397/diff/1/?file=205135#file205135line62" \
style="color: black; font-weight: bold; text-decoration: \
underline;">lib/thumbnailprovider/thumbnailgenerator.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">namespace Gwenview</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">62</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QByteArray</span> <span class="n">mFormatHint</span> <span \
class="o">=</span> <span class="n">pixPath</span><span class="p">.</span><span \
class="n">section</span><span class="p">(</span><span \
class="sc">&#39;.&#39;</span><span class="p">,</span> <span class="o">-</span><span \
class="mi">1</span><span class="p">).</span><span class="n">toAscii</span><span \
class="p">().</span><span class="n">toLower</span><span \
class="p">();</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Why is this \
needed?</pre>  </blockquote>



 <p>On October 23rd, 2013, 4:47 p.m. UTC, <b>Martin Kyral</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">the bytearray containing \
format hint seems to be mandatory:

(snip from qimagereader.h)
    explicit QImageReader(QIODevice *device, const QByteArray &amp;format = \
QByteArray());  explicit QImageReader(const QString &amp;fileName, const QByteArray \
&amp;format = QByteArray());</pre>  </blockquote>





 <p>On October 23rd, 2013, 8:55 p.m. UTC, <b>Martin Kyral</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Maybe I missed the point \
- I copied the code from loadingdocumentimpl.cpp thinking that obtaining the file \
type via QImageReader is better/more reliable than just taking the file \
extension.</pre>  </blockquote>





 <p>On October 23rd, 2013, 8:59 p.m. UTC, <b>Martin Kyral</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hm, bad memory :-/ I \
realized that the QImageReader stuff was there w/o the format hint. Deleting the \
line. Sorry for confusing comments...</pre>  </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In the end \
the format hint is necessary. Without it, QImageReader considers raw files to be tiff \
and processing fails (the raw code block is not entered).</pre> <br />




<p>- Martin</p>


<br />
<p>On October 25th, 2013, 9:47 a.m. UTC, Martin Kyral wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Gwenview and Aurélien Gâteau.</div>
<div>By Martin Kyral.</div>


<p style="color: grey;"><i>Updated Oct. 25, 2013, 9:47 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
gwenview
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This is a review of patch enabling raw support in gwenview. It uses \
KDcraw to extract the embedded jpeg preview (most of the raw formats contain it for \
the purposes of quick viewing the photos on the camera display) so it is fast, \
implementing was quite easy and theoretically it enables gwenview to support \
everything dcraw supports (practically we need to test more formats). The patch does \
not perform demosaicing and I don&#39;t think it shall - digikam, darktable or \
rawtherapee are much more suited for developing the &#39;digital negatives&#39;.

The patch fixes BZ#158788

The patch enables support for Nikon NEF and NRW formats, Canon&#39;s CR2, Pentax PEF, \
Sony ARW and Adobe DNG. If you want to try another format, just adding it&#39;s MIME \
type to the list in lib/mimetypeutils.cpp shall be enough.

The patch as is contains just the basic functionality (generating proper thumbnails \
and viewing the raw images incl. EXIF metadata), but it is well usable. However, \
there is still a lot of stuff to do (see the commit message in the patch) so I&#39;d \
appreciate any help.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Tested on some sample raw files taken from the camera reviews on \
http://www.photographyblog.com/ and bunch of my own photos. Nikon (tried D50, D70s, \
D90, D800 and Coolpix P7000), Canon (tried 7D, 5D Mark3 and 6D) and Pentax (K-X, K30) \
have the preview full-res, while Sony raw files (A900, A850, A58, Nex 3, Nex 6) have \
only 1616x1050.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>CMakeLists.txt <span style="color: grey">(4dafb7e)</span></li>

 <li>lib/CMakeLists.txt <span style="color: grey">(c6ffe14)</span></li>

 <li>lib/document/loadingdocumentimpl.cpp <span style="color: \
grey">(fbad8ff)</span></li>

 <li>lib/glibraw.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>lib/glibraw.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>lib/gwenviewconfig.kcfg <span style="color: grey">(231fd5e)</span></li>

 <li>lib/mimetypeutils.cpp <span style="color: grey">(546346f)</span></li>

 <li>lib/thumbnailprovider/thumbnailgenerator.cpp <span style="color: \
grey">(8b98904)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/113397/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Gwenview-devel mailing list
Gwenview-devel@kde.org
https://mail.kde.org/mailman/listinfo/gwenview-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic