Article Preview
Buy Now
| PDF: |
Review
GammaLib 2.2
Issue: 1.2 (October/November 2002)
Author: Shaun Eccles-Smith
Article Description: No description available.
Article Length (in bytes): 3,565
Starting Page Number: 9
RBD Number: 1104
Resource File(s): None
Related Link(s): None
Known Limitations: None
Full text of article...
If you use REALbasic for programming games or utilities, then this plug-in should be in your plug-in folder. This plug-in has one use, and it performs that function admirably: changing the monitor's gamma.
When monitors started being used extensively, it was discovered that the image that should be displayed and the one actually displayed were different. The electrons that are projected through the cathode ray tube to form the picture are slightly changed as they travel; they produce a darker image. The relationship between the darkness and electron deviation doesn't stay constant. Because of this phenomenon gamma was invented. When you change a monitor's gamma you change how the electrons come out of the cathode ray tube, making the picture lighter or darker. The same is true with LCD screens, but the pixels that make up the screen are made lighter or darker by a different mechanism.
Being able to change the user's gamma can be a useful function, if used properly. You can also use it for utility programs to fix your gamma. You could also play some very, very mean jokes on people with it, but I advise against it since it could result in some VERY threatening letters if you can't restore the gamma back to its original setting.
Using this plug-in is very simple. You have to do two things before you can change the gamma, and they are very small. The example included with the plug-in sets your monitor a deep blue in just 2 lines of code and a property. If you forget to use the .restore command, you will leave the gamma at that setting until the application is quit. This can be a bad thing if you make an extension out of the application, as the user has no way to quit it and the only way to restore is to reset the parameter ram (PRAM).
Compatibility is an interesting issue with this plug-in. It is not fully Carbon compatible. If you use the plug-in you have to be careful in how you deploy your built application. The way it works is unusual: if you compile for Carbon then you can only run it on Mac OS X. If you compile for PPC, you can only run it on PPC. There is even some confusion in compiling for a different Mac OS than you are running REALbasic on. If an application is compiled for Carbon and run in Carbon Classic mode then the compiled application will not show a warning message -- it will continue, but it will not change the gamma. If that causes a problem I suggest you enclose all GammaLib commands in an #if statement. This is a small problem if you distribute your application properly.
Overall, if you need a simple way to change your users' gamma, this is the best way to do it. Simple, quick, and easy. What more could you want?
In Brief Product GammaLib 2.2 Manufacturer Einhugur Software Price $49, for Einhugur subscription System Requirements 68k, PPC, OS X, or Win32 Contact Info support-at-einhugur.com
www.einhugur.com
Pros Simple solution to a sometimes difficult task
Cons
Spotty cross-platform support
Rating (1.0 - 5.0): 3.6
End of article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|










