Skip to content

Commit 516aad7

Browse files
committedApr 29, 2017
expose image compression in the layer metadata (fix #15702)
1 parent 2c4b3bb commit 516aad7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,15 @@ QString QgsGdalProvider::metadata()
286286
QgsDebugMsg( "dataset has no metadata" );
287287
}
288288

289+
// compression
290+
QString compression = QString( GDALGetMetadataItem( mGdalDataset, "COMPRESSION", "IMAGE_STRUCTURE" ) );
291+
if ( !compression.isEmpty() )
292+
{
293+
myMetadata += QLatin1String( "<p>" );
294+
myMetadata += tr( "COMPRESSION=%1" ).arg( compression );
295+
myMetadata += QLatin1String( "</p>\n" );
296+
}
297+
289298
for ( int i = 1; i <= GDALGetRasterCount( mGdalDataset ); ++i )
290299
{
291300
myMetadata += "<p class=\"glossy\">" + tr( "Band %1" ).arg( i ) + "</p>\n";

0 commit comments

Comments
 (0)
Please sign in to comment.