------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=122868         




------- Additional Comments From freebsd chillt de  2006-03-12 18:47 -------
Instead of using scanLine() to get single rows, you could use bits() to get a 
pointer to the entire image. It is equivalent to scanLine(0), but bits() is 
more self-explanatory when accessing the whole image. The result is an array of 
width() * height() tuples, each of type QRgb (after the correct cast has been 
applied). To get a border around the entire image, try:

QRgb* bits   = reinterpret_cast<QRgb*>(photoImg.bits());
QRgb  black  = qRgba(0, 0, 0, 255);
int   width  = photoImg.width();
int   height = photoImg.height();

// Top border
for (int i = 0; i < width; ++i)
    bits[i] = black;

// Bottom border
for (int i = width * (height - 1); i < width * height; ++i)
    bits[i] = black;

// Left border
for (int i = 0; i < width * height; i += width)
    bits[i] = black;

// Right border
for (int i = width - 1; i < width * height; i += width)
    bits[i] = black;

This is all off the top of my head and I have not tried compiling it - so it 
might need some massaging to get it past the sturdy compiler ;).
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to