Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-10

Carbon PPC: Blue-ish images from ImageList

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

EarMaster - Bent Olsen

Hi all,

Few months back I issued a bug regarding images getting "Blue-ish" when you assign speedbuttons glyph with images from a imagelist - see:

http://bugs.freepascal.org/view.php?id=11462

This issued was closed after I installed a newer and more stable Lazarus rev. 16677, and I'm now running v0.9.27 rev 16990+ on both i386 and PPC, and they're still looking great.

However, on test runs for some Macs with PPC, Mac OS X 10.5 (on an installation far, far away, and out of reach), the images get blue-ish, though they're looking just fine on my i386 and PPC with OS X 10.4.

See attached image - the first part is the original image, and the last part is how this image looks like on one particular Mac PPC OS X 10.5.

We have lots of images, both BMP and PNG, preloaded on components and loaded using Lazarus resources, and they all look just fine.

First I thought the colors for red, green, and blue was switched, but it turned out not quite. Or could some of Lazarus image manipulating functions have trouble detecting the right CPU on some OS version, switching colors, etc.?

Have anyone come across this behavior? This only shows with images from an imagelist. And should I report this as a bug?

Best regards,
Normann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test.png
Type: image/png
Size: 1410 bytes
Desc: not available
Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081020/1d20c8b4/attachment.png

Reply by email

Reenen Laurie
to EarMaster - Bent Olsen

I don't know a lot about image programming, but maybe this has something to do with set ups for CMYK, and not RGB?

2008/10/20 EarMaster - Bent Olsen

Show quoted text 41 lines
Hi all, Few months back I issued a bug regarding images getting "Blue-ish" when you assign speedbuttons glyph with images from a imagelist - see: http://bugs.freepascal.org/view.php?id=11462 This issued was closed after I installed a newer and more stable Lazarus rev. 16677, and I'm now running v0.9.27 rev 16990+ on both i386 and PPC, and they're still looking great. However, on test runs for some Macs with PPC, Mac OS X 10.5 (on an installation far, far away, and out of reach), the images get blue-ish, though they're looking just fine on my i386 and PPC with OS X 10.4. See attached image - the first part is the original image, and the last part is how this image looks like on one particular Mac PPC OS X 10.5. We have lots of images, both BMP and PNG, preloaded on components and loaded using Lazarus resources, and they all look just fine. First I thought the colors for red, green, and blue was switched, but it turned out not quite. Or could some of Lazarus image manipulating functions have trouble detecting the right CPU on some OS version, switching colors, etc.? Have anyone come across this behavior? This only shows with images from an imagelist. And should I report this as a bug? Best regards, Normann _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
o__ ,_.>/ _ (_)_\(_)_______ ...speed is good _______________ I believe five out of four people have a problem with fractions. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081020/70a0b19e/attachment-0001.html

Reply by email

Marc Weustink
to EarMaster - Bent Olsen: Few months back I issued a bug regarding images getting "Blue-ish" when you assign…
EarMaster - Bent Olsen wrote 28 lines
Hi all, Few months back I issued a bug regarding images getting "Blue-ish" when you assign speedbuttons glyph with images from a imagelist - see: http://bugs.freepascal.org/view.php?id=11462 This issued was closed after I installed a newer and more stable Lazarus rev. 16677, and I'm now running v0.9.27 rev 16990+ on both i386 and PPC, and they're still looking great. However, on test runs for some Macs with PPC, Mac OS X 10.5 (on an installation far, far away, and out of reach), the images get blue-ish, though they're looking just fine on my i386 and PPC with OS X 10.4. See attached image - the first part is the original image, and the last part is how this image looks like on one particular Mac PPC OS X 10.5. We have lots of images, both BMP and PNG, preloaded on components and loaded using Lazarus resources, and they all look just fine. First I thought the colors for red, green, and blue was switched, but it turned out not quite. Or could some of Lazarus image manipulating functions have trouble detecting the right CPU on some OS version, switching colors, etc.? Have anyone come across this behavior? This only shows with images from an imagelist. And should I report this as a bug?

Yes :(

I've only no clue how to debug this (I've only a PPC OSX 4). To recap, it works on i386 OSX 4 and not on OSX 5 ?

I'm puzzeled, if you look at the RGB or HLS channels you don't see anything swapped. It looks like some masking function failed (or used an alpha channel which shouldn't have been used)

Marc

Reply by email

EarMaster - Bent Olsen
to Marc Weustink

Hi all,

Show quoted text 11 lines
Yes :( I've only no clue how to debug this (I've only a PPC OSX 4). To recap, it works on i386 OSX 4 and not on OSX 5 ? I'm puzzeled, if you look at the RGB or HLS channels you don't see anything swapped. It looks like some masking function failed (or used an alpha channel which shouldn't have been used) Marc

I'm sorry, I made a huge mistake by switching versions between two clients, with two different bug reports. The correct OS version, the one with image problems, is Mac OS X 10.4.3 (PPC G5), so it's older than mine PPC G5 (10.4.11).

So the ones with 10.5 haven't reported any problems with images.

I will try and set up a small test tomorrow to try and narrow the problem - maybe if I could make a more detailed report of this, it could help.

Best regards,
Normann

Reply by email

EarMaster - Bent Olsen
to Marc Weustink: Yes :( I've only no clue how to debug this (I've only a PPC OSX 4). To recap, it works on…

Hi again,

I can't make a test, 'cause the one with Mac OS X 10.4.3 upgraded his OS X to 10.4.11, so now it also shows correctly for him.

All I can say is, getting images from an ImageList gets blue-ish on older OS X - at least for PPC, and I'm not sure about i386.

Best regards

Show quoted text 10 lines
I'm sorry, I made a huge mistake by switching versions between two clients, with two different bug reports. The correct OS version, the one with image problems, is Mac OS X 10.4.3 (PPC G5), so it's older than mine PPC G5 (10.4.11). So the ones with 10.5 haven't reported any problems with images. I will try and set up a small test tomorrow to try and narrow the problem - maybe if I could make a more detailed report of this, it could help.

Reply by email

mitya boyarintsev
to EarMaster - Bent Olsen

The bug is probably caused by internal image translation and processing.

If images are processed as 4 or 2 byte integers (Longword, word), not as a sequence of bytes, the code is simply not cross platform (not cross CPU at least). because PPC is big-endian CPU, while Intel (that is the primary for LCL component)s) in little-endian. Pixels can be placed in different oreder not RGB, but BGR (or vice versa)

AFAIK, Mac OS provides routines for CGImages to handle this cross-CPU situation. Intel-based images can be processed correclty on PPC. So little fix would be required for Cabon wigdetset.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081023/b03f7953/attachment.html

Reply by email