Skip to content

Commit

Permalink
expose image compression in the layer metadata (fix #15702)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 29, 2017
1 parent 2c4b3bb commit 516aad7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -286,6 +286,15 @@ QString QgsGdalProvider::metadata()
QgsDebugMsg( "dataset has no metadata" );
}

// compression
QString compression = QString( GDALGetMetadataItem( mGdalDataset, "COMPRESSION", "IMAGE_STRUCTURE" ) );
if ( !compression.isEmpty() )
{
myMetadata += QLatin1String( "<p>" );
myMetadata += tr( "COMPRESSION=%1" ).arg( compression );
myMetadata += QLatin1String( "</p>\n" );
}

for ( int i = 1; i <= GDALGetRasterCount( mGdalDataset ); ++i )
{
myMetadata += "<p class=\"glossy\">" + tr( "Band %1" ).arg( i ) + "</p>\n";
Expand Down

0 comments on commit 516aad7

Please sign in to comment.