Web server on xp - CHAPTER 11 PLUG-INS AND SCRIPTING 455 Fortunately,
CHAPTER 11 PLUG-INS AND SCRIPTING 455 Fortunately, once the plug-in has registered, you won t need to restart GIMP again. You can rebuild the plug-in and re-run it, and your changes will take effect. You only need to restart GIMP for a plug-in when you ve changed the registration routine somehow: if this is the first time you ve built this particular plug-in, if you re changing its name, or if you re changing the parameters it takes. After restarting GIMP, check your menus. The new plug-in name (such as Image . Autocrop All Layers) should appear in the menus now. Try running it. You haven t changed anything related to its function, so it should still do a normal Zealous Crop. Just to make sure you re really seeing the new plug-in, try a tweak. Remember I mentioned that it looked like the status bar was updating too often, and the (y % 20) should probably be (y % 20 == 0)? Try making that change. Everywhere you see % 20, add an == 0 after it. Then run gimptool –install autocropall.c to reinstall the new plug-in. Success! On my 500 400 test image, the time needed for a Zealous Crop shrunk from 6 seconds to about 2. The status bar update is a little jumpy, but it s worth the time savings. Note If you find a bug like this, please report it. I reported this problem, and my change will be in GIMP 2.4. See Chapter 12 for information on reporting bugs. Layer Coordinates vs. Image Coordinates Now it s time to make the real changes: to make autocropall.c look through all the visible layers. The changes will all be in do_acrop. One difference when working with layers, compared to a whole image, is that coordinates may change. Layers aren t always the size of the whole image, and sometimes they re offset compared to the image. Take a look at the two spheres image in Figure 11-11. The layer containing the blue sphere is offset to the right and down compared to the image: the layer s upper-left edge is at image position (XL, YL). Figure 11-11. Two spheres, three layers, three coordinate systems
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.