Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 214635 Details for
Bug 295459
Ebuild request for media-gfx/digikam-1.1.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix the over- and under-exposure indicators for 16-bit images
digikam-1.0.0-overexposure-indicator.patch (text/plain), 3.18 KB, created by
Richard Ash
on 2009-12-30 16:16:00 UTC
(
hide
)
Description:
patch to fix the over- and under-exposure indicators for 16-bit images
Filename:
MIME Type:
Creator:
Richard Ash
Created:
2009-12-30 16:16:00 UTC
Size:
3.18 KB
patch
obsolete
>Index: digikam/libs/dimg/dimg.cpp >=================================================================== >--- digikam/libs/dimg/dimg.cpp (revision 1067723) >+++ digikam/libs/dimg/dimg.cpp (working copy) >@@ -1597,70 +1597,64 @@ > // -------------------------------------------------------- > > uint dim = m_priv->width * m_priv->height; >- uint* sptr = (uint*)m_priv->data; > uchar* dptr = bits; > >- if (under && over) >+ if (sixteenBit()) > { >+ ushort* sptr = (ushort*)m_priv->data; >+ > for (uint i = 0; i < dim; ++i) > { >- int s_red = qRed(*sptr); >- int s_green = qGreen(*sptr); >- int s_blue = qBlue(*sptr); >+ int s_blue = *sptr++; >+ int s_green = *sptr++; >+ int s_red = *sptr++; >+ sptr++; > >- if ((s_red == 0) && (s_green == 0) && (s_blue == 0)) >+ if ((under) && (s_red == 0) && (s_green == 0) && (s_blue == 0)) > { >- dptr[0] = u_blue; >- dptr[1] = u_green; >- dptr[2] = u_red; >- dptr[3] = 0xFF; >+ dptr[0] = u_blue; >+ dptr[1] = u_green; >+ dptr[2] = u_red; >+ dptr[3] = 0xFF; > } > >- if ((s_red == max) && (s_green == max) && (s_blue == max)) >+ if ((over) && (s_red == max) && (s_green == max) && (s_blue == max)) > { >- dptr[0] = o_blue; >- dptr[1] = o_green; >- dptr[2] = o_red; >- dptr[3] = 0xFF; >+ dptr[0] = o_blue; >+ dptr[1] = o_green; >+ dptr[2] = o_red; >+ dptr[3] = 0xFF; > } > > dptr += 4; >- ++sptr; > } > } >- else if (under) >+ else > { >- for (uint i = 0; i < dim; ++i) >+ uint* sptr = (uint*)m_priv->data; >+ >+ for (uint i = 0; i < dim; ++i) > { >- if ((qRed(*sptr) == 0) && (qGreen(*sptr) == 0) && (qBlue(*sptr) == 0)) >+ if ((under) && (qRed(*sptr) == 0) && (qGreen(*sptr) == 0) && (qBlue(*sptr) == 0)) > { >- dptr[0] = u_blue; >- dptr[1] = u_green; >- dptr[2] = u_red; >- dptr[3] = 0xFF; >+ dptr[0] = u_blue; >+ dptr[1] = u_green; >+ dptr[2] = u_red; >+ dptr[3] = 0xFF; > } > >- dptr += 4; >- ++sptr; >- } >- } >- else // over-exposure >- { >- for (uint i = 0; i < dim; ++i) >- { >- if ((qRed(*sptr) == max) && (qGreen(*sptr) == max) && (qBlue(*sptr) == max)) >+ if ((over) && (qRed(*sptr) == max) && (qGreen(*sptr) == max) && (qBlue(*sptr) == max)) > { >- dptr[0] = o_blue; >- dptr[1] = o_green; >- dptr[2] = o_red; >- dptr[3] = 0xFF; >+ dptr[0] = o_blue; >+ dptr[1] = o_green; >+ dptr[2] = o_red; >+ dptr[3] = 0xFF; > } > > dptr += 4; > ++sptr; > } > } >- > return img; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 295459
:
213289
|
213778
|
213779
|
214593
|
214595
|
214634
| 214635 |
218407
|
218409
|
218411