View Issue Details

IDProjectCategoryView StatusLast Update
0015963ScribusGeneralpublic2019-11-26 14:37
Reporterale Assigned Toale  
Status closedResolutionno change required 
Product Version1.5.6.svn 
Target VersionFixed in Version 
Summary0015963: ScImgDataLoader_JPEG::loadPicture(): a loop that seems to do nothing...
Descriptionin ScImgDataLoader_JPEG::loadPicture() the snippet below seems to do nothing:

            if (cinfo.output_components == 4)
                QRgb *s;
                unsigned char cc, cm, cy, ck;
                for (int yit=0; yit < m_image.height(); ++yit)
                    s = (QRgb*)(m_image.scanLine( yit ));
                    for (int xit=0; xit < m_image.width(); ++xit)
                        cc = 255 - qRed(*s);
                        cm = 255 - qGreen(*s);
                        cy = 255 - qBlue(*s);
                        ck = qMin(qMin(cc, cm), cy);
                        *s = qRgba(cc-ck,cm-ck,cy-ck,ck);

it sets s, cc, cm, cy, and ck but they're all local variables and they cannot be used outsided of the if context.
TagsNo tags attached.



2019-11-26 14:37

manager   ~0047143

ah, no sorry, now i get what it does...
or at least, where it does something...

(QRgb*)(m_image.scanLine( yit ));

returns a pointer and that the content of s is being changed...

sorry for the noise

Issue History

Date Modified Username Field Change
2019-11-26 14:33 ale New Issue
2019-11-26 14:37 ale Assigned To => ale
2019-11-26 14:37 ale Status new => closed
2019-11-26 14:37 ale Resolution open => no change required
2019-11-26 14:37 ale Note Added: 0047143