Review Request: Make TGA loader recognize all tga files it can handle

Allen Winter winter at kde.org
Thu Apr 30 18:05:03 BST 2009


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

Ship it!


looks fine to me

- Allen


On 2009-04-27 01:08:22, Aurélien Gâteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/634/
> -----------------------------------------------------------
> 
> (Updated 2009-04-27 01:08:22)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> TGA loader uses a regex to determine whether it can decode a file. This regex is incomplete and does not recognize all TGA types the loader can handle.
> 
> Attached patch reuses the code used to decode the TGA header instead of using a regex.
> 
> 
> This addresses bug 188191.
>     https://bugs.kde.org/show_bug.cgi?id=188191
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kimgio/tga.cpp 957384 
> 
> Diff: http://reviewboard.kde.org/r/634/diff
> 
> 
> Testing
> -------
> 
> Tested successfully with the TGA file attached with bug 188191. I am wondering about the performance though: the canRead() method is called whenever one tries to decode an image without precising its format so it must be fast. The new code uses QDataStream, the old code used QRegExp. I did not observe a performance hit, but would welcome opinion from anyone with more insight on QDataStream and QRegExp.
> 
> 
> Thanks,
> 
> Aurélien
> 
>





More information about the kde-core-devel mailing list