From b6fc9840f4fe9bad392167c49dbcfa2acda9ed21 Mon Sep 17 00:00:00 2001 From: alwin Date: Thu, 24 Mar 2005 21:13:40 +0000 Subject: last bugfixes on opie-eye an imagescrollview. Seems that now all is working as it should. --- (limited to 'libopie2/opiemm') diff --git a/libopie2/opiemm/oimagescrollview.cpp b/libopie2/opiemm/oimagescrollview.cpp index 10da823..76f50e1 100644 --- a/libopie2/opiemm/oimagescrollview.cpp +++ b/libopie2/opiemm/oimagescrollview.cpp @@ -205,6 +205,7 @@ void OImageScrollView::setAutoScale(bool how) if (ImageIsJpeg() && how == false && ImageScaledLoaded()==true) { loadJpeg(true); } + _newImage = true; generateImage(); } @@ -348,8 +349,10 @@ void OImageScrollView::rotate_into_data(Rotation r) // yes - sorry - it is NOT gamma it is just BRIGHTNESS. Alwin void OImageScrollView::apply_gamma(int aValue) { - if (!_image_data.size().isValid()) return; + if (aValue==0 || !_image_data.size().isValid()) return; float percent = ((float)aValue/100.0); + /* make sure working on a copy */ + _image_data.detach(); int segColors = _image_data.depth() > 8 ? 256 : _image_data.numColors(); /* must be - otherwise it displays some ... strange colors */ -- cgit v0.9.0.2