Skip to content

Commit 06c5d24

Browse files
authoredSep 12, 2017
Merge pull request #4440 from alexbruy/gdal-compression
expose image compression in the layer metadata (fix #15702)
2 parents 220b58d + 516aad7 commit 06c5d24

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
@@ -301,6 +301,15 @@ QString QgsGdalProvider::metadata()
301301
QgsDebugMsg( "dataset has no metadata" );
302302
}
303303

304+
// compression
305+
QString compression = QString( GDALGetMetadataItem( mGdalDataset, "COMPRESSION", "IMAGE_STRUCTURE" ) );
306+
if ( !compression.isEmpty() )
307+
{
308+
myMetadata += QLatin1String( "<p>" );
309+
myMetadata += tr( "COMPRESSION=%1" ).arg( compression );
310+
myMetadata += QLatin1String( "</p>\n" );
311+
}
312+
304313
for ( int i = 1; i <= GDALGetRasterCount( mGdalDataset ); ++i )
305314
{
306315
myMetadata += "<p class=\"glossy\">" + tr( "Band %1" ).arg( i ) + "</p>\n";

0 commit comments

Comments
 (0)
Please sign in to comment.