From 56620e87b733050014de79f2d8cd36665957926e Mon Sep 17 00:00:00 2001 From: Sergey Linev <S.Linev@gsi.de> Date: Thu, 4 Mar 2021 16:26:38 +0100 Subject: [PATCH] [asimage] use SCREEN_GAMMA as parameter Otherwise image slowly degrade if doing loop: for (int i=0;i<100;++i) { img1->GetImageBuffer(&buf, &sz); img1->SetImageBuffer(&buf); } --- graf2d/asimage/src/TASImage.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graf2d/asimage/src/TASImage.cxx b/graf2d/asimage/src/TASImage.cxx index 1ad74266445..f5d77f49506 100644 --- a/graf2d/asimage/src/TASImage.cxx +++ b/graf2d/asimage/src/TASImage.cxx @@ -6047,8 +6047,8 @@ Bool_t TASImage::SetImageBuffer(char **buffer, EImageFileTypes type) params.width = 0; params.height = 0 ; params.filter = SCL_DO_ALL; - params.gamma = 1; - params.gamma_table = 0; + params.gamma = SCREEN_GAMMA; + params.gamma_table = nullptr; params.compression = 0; params.format = ASA_ASImage; params.search_path = 0; -- GitLab