Review Request 113397: RAW preview in gwenview

Aurélien Gâteau agateau at kde.org
Mon Oct 28 12:39:59 UTC 2013


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



lib/document/loadingdocumentimpl.cpp
<http://git.reviewboard.kde.org/r/113397/#comment30846>

    This can go away



lib/document/loadingdocumentimpl.cpp
<http://git.reviewboard.kde.org/r/113397/#comment30847>

    No need for a local variable for this, it is only used once.
    
    You can just call contains(QString(mFormatHint)) in the "if" below.



lib/glibraw.h
<http://git.reviewboard.kde.org/r/113397/#comment30843>

    The license comment block should go first, and it should say "2013 Martin Kyral <your.email at here>"



lib/glibraw.h
<http://git.reviewboard.kde.org/r/113397/#comment30844>

    GLibRaw should be a namespace. Also, can you rename it to GvLibRaw for consistency with other classes prefixed with "Gv"?



lib/glibraw.h
<http://git.reviewboard.kde.org/r/113397/#comment30845>

    This method is not useful outside of GvLibRaw, you can make it a static local method in gvlibraw.cpp only.



lib/thumbnailprovider/thumbnailgenerator.cpp
<http://git.reviewboard.kde.org/r/113397/#comment30849>

    Same as before, no need for a local variable



lib/thumbnailprovider/thumbnailgenerator.cpp
<http://git.reviewboard.kde.org/r/113397/#comment30848>

    Remove the std::cout calls



lib/thumbnailprovider/thumbnailgenerator.cpp
<http://git.reviewboard.kde.org/r/113397/#comment30850>

    Aren't you applying the orientation for the second time here?



lib/thumbnailprovider/thumbnailgenerator.cpp
<http://git.reviewboard.kde.org/r/113397/#comment30851>

    This code is duplicated. I think the function should be reorganized like this:
    
    QScopedPointer<QBuffer> rawBuffer;
    
    if raw:
       // read preview in data
       // set jpegContent
       rawBuffer.reset(new QBuffer(&data));
       reader.setDevice(rawBuffer)
    else if jpeg:
       // set jpegCcontent
    
    if jpegContent:
       orientation = jpegContent.orientation()
       // get thumbnail from jpegContent
       if big enough:
           // apply exif orientation
           mOriginalWidth =
           mOriginalHeight =
           return true
    
    // generate thumbnail from full image
    
    // apply exif orientation
    
    return true


Two more things: Don't forget to close the issues in review board when they are fixed, it helps tracking down the progress. documenttest.cpp needs to be extended to test raw file support. Do you have raw files which are not too big, ideally less than 1MB? (I know "raw" and "not too big" do not go very well together, but doesn't harm asking)

- Aurélien Gâteau


On Oct. 25, 2013, 11: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, 11: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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gwenview-devel/attachments/20131028/3770f7d1/attachment.html>


More information about the Gwenview-devel mailing list