Hi,

while trying to debug the issue betweeen GUI and GWorkspace icons with multi-page tiffs and high-res versions of our GUI controls, I noticed something strange.

I did a test-case on Mac where due to different backgrounds it is easier to detect.

The "scale" (but actually any) code I use IN PRICE and thus in also in GWorkspace appears to be broken, it produces artefacts with images with Alpha channel.

Even verys imple code, where I copy from the source to destination all "samples per pixels" copies all colors correctly, copies but produces effect around the borders and, apparently, on certain images it totally ruins alpha, on others not, just around the borders.

e.g in simplified pseudocode.

for (height)
  for (width)
    for (i in samples per pixel)
     destData[xy +  i] = srcData[xy +i];

fails. The actual code is actually smarter and tries to use bytesPerRow.

Does a bell ring for anybody? I know that e.g. when scaling, pre-multiplied alpha should be considered, but this produces minor issues and should not affect just simple copying or flipping or such. The nested loops should essentially do a byte-copy.. and they do for images without alpha.

Riccardo

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to