DImg sixteenbits flag corrupted ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

DImg sixteenbits flag corrupted ?

Gilles Caulier-4
Marcel,

Try my current code from svn about B&W converter and look line 126
from bwsepiafilter.cpp :

//        uchar* targetData = new uchar[m_orgImage.numBytes()];
        uchar* targetData = new
uchar[m_orgImage.width()*m_orgImage.height()*(m_orgImage.sixteenBit()
? 8 : 4)];

Both lines must give the same result in tool preview. But if you use
DImg::numBytes(), i can see an image with an height reduced by 2 ! the
question is why ?

Can you reproduce it ?

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: DImg sixteenbits flag corrupted ?

Marcel Wiesweg

> Both lines must give the same result in tool preview. But if you use
> DImg::numBytes(), i can see an image with an height reduced by 2 ! the
> question is why ?
>
> Can you reproduce it ?

No. I put this in line 126:
kDebug() << m_orgImage.numBytes() <<
m_orgImage.width()*m_orgImage.height()*(m_orgImage.sixteenBit() ? 8 : 4);

and get the same (correct) result for an 8 or 16bit image.
However, I get a lot of these:
Digikam::HistogramPainterPriv::scaleToPixmapHeight: Scaling value < 0:  0 .
Falling back to 1.0

and the filter is broken: for 8bit, I get simply a gray result image, for
16bit, the upper half is grey and the lower half is the original.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: DImg sixteenbits flag corrupted ?

Gilles Caulier-4
2010/2/23 Marcel Wiesweg <[hidden email]>:

>
>> Both lines must give the same result in tool preview. But if you use
>> DImg::numBytes(), i can see an image with an height reduced by 2 ! the
>> question is why ?
>>
>> Can you reproduce it ?
>
> No. I put this in line 126:
> kDebug() << m_orgImage.numBytes() <<
> m_orgImage.width()*m_orgImage.height()*(m_orgImage.sixteenBit() ? 8 : 4);
>
> and get the same (correct) result for an 8 or 16bit image.
> However, I get a lot of these:
> Digikam::HistogramPainterPriv::scaleToPixmapHeight: Scaling value < 0:  0 .
> Falling back to 1.0
>
> and the filter is broken: for 8bit, I get simply a gray result image, for
> 16bit, the upper half is grey and the lower half is the original.

well here all is fine, in 16 or 8 bits. Sound like a race condition
somewhere i think. I search...

Gilles

> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel