From 4c7025bd5b3918202fb0e0176f1b803bf6ac7199 Mon Sep 17 00:00:00 2001 From: Andrea Giudiceandrea Date: Sun, 25 Aug 2024 19:59:32 +0200 Subject: [PATCH 1/2] GDAL: Fix Compression metadata info --- src/core/providers/gdal/qgsgdalprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/providers/gdal/qgsgdalprovider.cpp b/src/core/providers/gdal/qgsgdalprovider.cpp index 31a84474f92d..c36aec071987 100644 --- a/src/core/providers/gdal/qgsgdalprovider.cpp +++ b/src/core/providers/gdal/qgsgdalprovider.cpp @@ -536,7 +536,7 @@ QString QgsGdalProvider::htmlMetadata() const myMetadata += QStringLiteral( "" ) + tr( "Dataset Description" ) + QStringLiteral( "" ) + QString::fromUtf8( GDALGetDescription( mGdalDataset ) ) + QStringLiteral( "\n" ); // compression - QString compression = QString( GDALGetMetadataItem( mGdalDataset, "COMPRESSION", "IMAGE_STRUCTURE" ) ); + QString compression = QString::fromUtf8( GDALGetMetadataItem( mGdalDataset, "COMPRESSION", "IMAGE_STRUCTURE" ) ); myMetadata += QStringLiteral( "" ) + tr( "Compression" ) + QStringLiteral( "" ) + compression + QStringLiteral( "\n" ); // Band details From 31e2dbe14927e68cbd5cf0e009d99b61a5e56b9d Mon Sep 17 00:00:00 2001 From: Andrea Giudiceandrea Date: Mon, 26 Aug 2024 01:31:19 +0200 Subject: [PATCH 2/2] Update src/core/providers/gdal/qgsgdalprovider.cpp --- src/core/providers/gdal/qgsgdalprovider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/providers/gdal/qgsgdalprovider.cpp b/src/core/providers/gdal/qgsgdalprovider.cpp index c36aec071987..60462c62235e 100644 --- a/src/core/providers/gdal/qgsgdalprovider.cpp +++ b/src/core/providers/gdal/qgsgdalprovider.cpp @@ -536,8 +536,8 @@ QString QgsGdalProvider::htmlMetadata() const myMetadata += QStringLiteral( "" ) + tr( "Dataset Description" ) + QStringLiteral( "" ) + QString::fromUtf8( GDALGetDescription( mGdalDataset ) ) + QStringLiteral( "\n" ); // compression - QString compression = QString::fromUtf8( GDALGetMetadataItem( mGdalDataset, "COMPRESSION", "IMAGE_STRUCTURE" ) ); - myMetadata += QStringLiteral( "" ) + tr( "Compression" ) + QStringLiteral( "" ) + compression + QStringLiteral( "\n" ); + const char *compression = GDALGetMetadataItem( mGdalDataset, "COMPRESSION", "IMAGE_STRUCTURE" ); + myMetadata += QStringLiteral( "" ) + tr( "Compression" ) + QStringLiteral( "" ) + QString::fromUtf8( compression )+ QStringLiteral( "\n" ); // Band details for ( int i = 1; i <= GDALGetRasterCount( mGdalDataset ); ++i )