Skip to content
Permalink
Browse files

Merge pull request #4440 from alexbruy/gdal-compression

expose image compression in the layer metadata (fix #15702)
  • Loading branch information
alexbruy committed Sep 12, 2017
2 parents 220b58d + 516aad7 commit 06c5d24ebba81ae8e28577919d399a75fc64a260
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/providers/gdal/qgsgdalprovider.cpp
@@ -301,6 +301,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";

0 comments on commit 06c5d24

Please sign in to comment.
You can’t perform that action at this time.