Pixel corruption in PICT images with 16-bit GWorlds on Intel
Pixel corruption in PICT images with 16-bit GWorlds on Intel
- Subject: Pixel corruption in PICT images with 16-bit GWorlds on Intel
- From: Stephen Kay <email@hidden>
- Date: Thu, 25 Oct 2012 22:20:30 -0400
- Thread-topic: Pixel corruption in PICT images with 16-bit GWorlds on Intel
Example:
http://www.karma-lab.com/temp/pixel-corruption.jpg
(Sorry to repeat from other messages, but the background: porting an old
Carbon PPC application (CW, PowerPlant) that is heavily resource-based, and
only had a PPC version, that runs fine on 10.4 to 10.6.8 (w/Rosetta). The
goal is to get an Intel version with no new features, just the capability to
run on Intel machines - at least at first.)
Most of the user interface objects are based on PICT resources. And
generally, most of the UI objects do their drawing in GWorlds which are then
copied to the screen (part of the reason for this is so that objects that
use the same pictures can share the same GWorlds.)
I understand that ideally I should stop using GWorlds for much of this since
it's no longer necessary on Mac OS X - so I'm aware of that advice. But for
now, I just want to get the code ported without making major rewrites if
possible.
What I have been doing for the longest time is creating the GWorlds with a
pixel depth of 16 bits - because the graphics are all 16-bit, and creating
32-bit GWorlds uses almost twice the "real" memory, and doesn't look any
different. This strategy worked fine on my earlier PPC versions, and even
looks fine on my newly created Intel version running on 10.4.
However, when I run the new Intel version on 10.5 and 10.6, with 16-bit
GWorlds, the bottom 1-pixel row of each picture is corrupted. It looks
basically like a dotted line under each individual PICT, as shown in the
section of the UI in the link at the top.
If I create all the GWorlds as 32-bit (either with a pixel depth of 0 or
32), the images all draw correctly, as shown in the example above.
However, again this uses twice the memory. For example, with 16-bit GWorlds,
the app uses about 145 MB of real memory. With 32-bit GWorlds, it uses about
248 MB of real memory, and more virtual memory as well.
I have searched the net for several days trying to find anything on this and
came up empty-handed. Has anyone ever seen anything like this?
Thanks,
- Stephen
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen Kay
Karma-Lab :: developers of KARMA
http://www.karma-lab.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden