Archive for April, 2008

464 CHAPTER (Web hosting uk) 12 ADDITIONAL TOPICS Here is

Wednesday, April 30th, 2008

464 CHAPTER 12 ADDITIONAL TOPICS Here is where you adjust the brightness, contrast, and color balance of your prints. Every printer model is a little different. Some may emphasize one color or another; others may print too light or too dark, or have other problems. This isn t very important when you re printing out web maps and directions, or even fliers for your company picnic. But when you re making glossy photos to hang on your wall or give to relatives, it matters. To find out how your printer stacks up, you will probably have to experiment, printing several images and trying different settings. This can be slightly costly since you can use up ink and expensive paper. Fortunately, you don t need to print full-page images to test a printer: you can print small images, feed the same page through multiple times, and use the Gimp-Print position and size settings to place the image at a different location on the page each time. On a particularly tricky image, you might want to create a smaller test image that includes some of the extremes of the original. The Gutenprint plug-in allows still more adjustments. It gives you a list of presets, such as Mixed Text and Graphics (the default) or Line Art, but selecting Manual Control gives you a long list of every value you might possibly want to adjust. Most of them are grayed-out by default; try clicking the toggle button next to any item to enable it. Once you ve found settings that look the way you want them (which usually means that the printed image looks similar to the image you see on screen), you can Save Settings, and Gimp-Print will remember these settings next time. Each setting has a tooltip: to see it, hover over the text field for that setting. Some of the tricky ones are Density, Gamma, and Dither Algorithm. Density controls the amount of ink used for printing. Normally, this should not need adjustment, but if your prints come out with so much ink that it smears or soaks into the paper, or so little that black areas aren t fully black or colors seem faded, this is the place to adjust it. You met Gamma briefly in Chapter 2: it corresponds to the middle slider in the Levels dialog. Generally, gamma works like brightness: larger values mean a brighter print; smaller values mean a darker one. However, adjusting gamma won t change the levels of black or white in the image, only the middle tones in between. Dither Algorithm controls how the GIMP maps its internal RGB colors to the CMYK colors the printer understands. In addition, printing almost always involves some scaling: it s not likely that the number of pixels in your image will exactly match the number of dots your printer would use at the size you want the image to appear. Fortunately, the print software does a good job of scaling and color mapping. Most of the time, the default methods it uses are fine, but if you ever want to fine-tune the result, you can choose from a variety of algorithms: Adaptive Hybrid (the default), Ordered, Fast, Very Fast, Hybrid Floyd-Steinberg, or EvenTone. The Gimp-Print project recommends using Adaptive Hybrid for highest quality. That should be the default, and most of the time you can leave it alone. If you want to experiment with other settings, Ordered can work just as well and is faster for images with mostly continuous tones (no text or line art). Fast is faster, but at the expense of quality (Very Fast is more so, but it sacrifices more quality than most people will tolerate). You can get details on some of the other algorithms on the Gimp-Print website, gimp-print.sourceforge.net. Print to File Even if you don t have a printer connected to your GIMP machine, you can print to a PostScript file. In the Printer name menu at the top of Printer Settings, choose *File. You will be prompted for a file name. It s probably best to give the file a name with a .ps extension, so that every machine where you try to use it will recognize that it s PostScript.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

Web site template - CHAPTER 12 ADDITIONAL TOPICS 463 The Center

Wednesday, April 30th, 2008

CHAPTER 12 ADDITIONAL TOPICS 463 The Center buttons let you center the image Vertically, Horizontally, or Both. These buttons are particularly useful after adjusting Size, since you can re-center the image quickly. Making the Print: The Buttons at the Bottom Once you re happy with the paper and resolution settings and the photo s size and position on the page, you can make a print using the Print button. You also have the option of saving the settings you just defined for Size, Position, and Printer Settings by clicking on Save Settings, or you can do both at once using Print and Save Settings. Any settings you save will be remembered for future GIMP sessions. The other buttons Help, About, and Cancel are self-explanatory. Once you click on Print or Print and Save Settings, GIMP should begin sending data to the printer. At a high-resolution setting, this may take a while; watch the status bar at the bottom- right of the GIMP image window for progress. Fine-Tuning: Image/Output Settings Remember that Image/Output Settings tab that I skipped at the top of the Gimp-Print dialog? These settings let you fine-tune the brightness and color of the image, choosing from several presets. You can think of Line art as analogous to black-and-white drawings or text (2-bit color), Solid colors as analogous to indexed color (with areas over which the color is constant), and Photograph as 24-bit true color. If in doubt, leave at the default setting, Photograph. Output type is more useful. If you re printing a grayscale or black-and-white image, selecting the appropriate value will restrict your printer to only black ink. This may be cheaper, depending on the printer; certainly it looks different from a monochrome image printed with colored inks. Try both and see the difference. But the real power of the Image/Output Settings tab is the Adjust Output… button, which brings up the Print Color Adjust dialog shown in Figure 12-3. Figure 12-3. The Print Color Adjust dialog
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

462 CHAPTER 12 ADDITIONAL TOPICS Setting the

Tuesday, April 29th, 2008

462 CHAPTER 12 ADDITIONAL TOPICS Setting the Image s Position, Orientation, and Size Orientation lets you choose the orientation of the image on the page (Figure 12-2). Figure 12-2. Orientation options The choices are as follows: Auto: GIMP will use the orientation that best matches the image s own dimensions. Portrait: The image will be right-side up when the paper is held like a normal page, taller than it is wide, even if the image is wider than it is high. Landscape: The image will be right-side up when the paper is held with its longer dimension horizontal. Upside down: Portrait, but with the image upside down. The bottom of the image will print first. Seascape: Landscape, but upside down. Now skip down to the broad Size slider. Grab it and slide it to change the size of the image. 100% actually means the largest size that will fit on the page, but you can scale the image down as small as you want. The preview will update as you adjust the slider, so you can see how the image compares to the paper size. The Width and Height of the image as it will be printed is displayed under the slider; if you want the image to come out a specific size, you can edit these fields directly rather than using the slider. But be careful: they don t always update when you move from one to another, so it may work better to use the slider until the Width and Height read your desired amounts. The checkboxes under the slider let you change the units, for instance to PPI (Pixels per Inch) instead of Percent. As soon as you make any changes to the Size slider, you ll see the fields under Position update to show the current settings for the Left, Right, Top, and Bottom edges of the image on the page. You can edit these fields directly if you want precise positioning, or drag the preview image around on the page and watch the values change.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

CHAPTER 12 ADDITIONAL TOPICS 461 Why does

Monday, April 28th, 2008

CHAPTER 12 ADDITIONAL TOPICS 461 Why does it default to PostScript? Because the printing system on Mac OS X, Linux, and most Unix systems is based on Adobe s PostScript language. If GIMP creates PostScript, it can send it to the printing system, which will then translate it to whatever your specific printer needs. Sounds nice and simple, right? But the generic PostScript model used by the printing system doesn t do high quality printing. It can t control any of the nifty special features most inkjet printers offer, such as high resolution or settings for special photo paper. For now, try to use a more specific printer model instead of PostScript. Check the Printer model and if it s not what you expect to see, click Setup Printer… (if there s already a printer displayed) or New Printer… (if no printer is displayed yet). Scroll down to find and select your printer make and model from the list in the dialog. (If you have trouble working in such a small scrolled list, you can resize the dialog larger to make it show more printers at once.) If you don t find your exact printer model, something close may work (for instance, C84 works for an Epson C86). If you don t find anything that s even close, you may have to use the generic PostScript Level 2 setting. (In the Gutenprint plug-in, this is found under Printer Make: Adobe.) Caution If you use the PostScript setting, you also need to look at the Command field. If it includes oraw, delete that. It s a bug in some versions of Gimp-Print that -oraw is included for PostScript printers: it s needed for all other printers, but should not be included for PostScript. If you have a real PostScript printer, the PPD File field is a place where you can select a driver for that printer. PPD files apply only to PostScript printers. The field should not appear, or should be grayed out, for everyone else. Click OK and you re back in the Gimp-Print dialog, with the correct Printer Model. It s a good idea to click Save Settings at the bottom of the dialog immediately after setting your printer, to ensure that GIMP remembers it. Set Print Size, Paper Type, and Resolution Once your printer is set correctly, Gimp-Print s options should reflect the capabilities of your printer. Adjust Media size to the size of the paper you re using (Letter, A4, 4 6, and so on). For most printers, you shouldn t need to change Dimensions, Media source, or Ink type. However, Media type is important: if you re using special paper, such as Photo Paper or Glossy Film, set it here. You ll find that the paper-type setting makes a big difference in printing photographs: photo quality papers require more ink and can accept higher resolution. Usually, the right paper setting will be obvious, but for some papers, you may have to guess. (Is Premium Matte Photo Paper most like Photo Paper, Matte Paper Heavyweight, Premium Luster Photo Paper, or what? You may have to experiment to get the best results.) Resolution is the final setting, and it should offer a list of the resolutions your printer can use. Higher resolutions will take much longer to print and will use more memory and more ink, but will give you a print with sharper detail and smoother color. What about that other tab, Image/Output Settings? I ll get to that in a minute. But first, take a look at the bottom half of the dialog, starting with that Position section on the right below the printer settings area.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

460 CHAPTER 12 ADDITIONAL TOPICS Then, you ll (Free web hosting services)

Saturday, April 26th, 2008

460 CHAPTER 12 ADDITIONAL TOPICS Then, you ll see the dialog shown in Figure 12-1. Figure 12-1. The basic Gimp-Print dialog On the left is a rough preview of your image and how it will look on the page. You can get a general idea of image brightness, but the preview s main use is to let you drag the image to control its size and position on the page. To the right of the preview is a Settings area with two tabs. Initially, the Printer Settings tab is visible. This lets you choose your printer model and control important details like paper size, paper type, and resolution. Setting Your Printer Model The first step is to tell Gimp-Print what type of printer you have by clicking Setup Printer…. This is very important. The single most common cause of printing problems is that Gimp-Print doesn t automatically set this field, even if the printer is already configured as the default system printer. Notice the printer settings in Figure 12-1. Printer name is *Stylus-C84. If I didn t pay close attention, I might be lured into thinking that Gimp-Print knows what type of printer I have. But look at the next line below that: the Printer model is PostScript Level 2.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Additional Topics CHAPTER 12 By (Free web hosting with ftp)

Friday, April 25th, 2008

Additional Topics CHAPTER 12 By now, you re familiar with most of the basic techniques of image manipulation available in the GIMP. In this chapter, I ll show you a few details that haven t been covered already, discuss ways of customizing the GIMP, and describe some of the web resources that can help you learn even more. The chapter will cover the following: Printing with Gimp-Print/Gutenprint Screen shots and scanners: the Acquire menu GIMP configuration files Additional resources Printing with Gimp-Print or Gutenprint Printing in GIMP isn t built-in; it s handled by a plug-in. That means that printing may be different on different platforms. GIMP for Windows prints using the standard Windows print dialogs. Any adjustment to the output will probably go through the dialogs supplied by your printer manufacturer. These may be different for each printer, so this book won t try to cover them. On most Linux and Mac systems, the print plug-in for GIMP is included in the normal GIMP installation. It comes from a separate project, though, historically called Gimp-Print. (The Gimp-Print project is also the origin of many color printer drivers used by Linux and Mac OS X.) Despite the name, the Gimp-Print project is separate from GIMP and is run by different people. The project was recently renamed Gutenprint, and has a brand-new printing plug-in available. As of this book s press deadline, GIMP still includes the old Gimp-Print plug-in, but it may switch to the new Gutenprint version in the future. Initiate printing using the menu item File . Print. If your image has multiple layers or other GIMP-specific enhancements, GIMP will tell you it needs to export the image. Don t worry; this won t change your original image.
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

458 CHAPTER 11 PLUG-INS AND SCRIPTING If

Friday, April 25th, 2008

458 CHAPTER 11 PLUG-INS AND SCRIPTING If the color is different from the color of the first pixel in the row, ymax = y + layerOffsetY + 1; break; convert back to image coordinates and update ymax. After checking all four edges like this, in each layer in the image, xmin, xmax, ymin and ymax should hold the coordinates to pass to crop. Crop takes its parameters in a slightly unin tuitive order: gimp_image_crop(image_id, new_width, new_height, offset_y, offset_x). xmax and ymax are coordinates, not dimensions, so you have to subtract: gimp_image_crop(image_id, xmax - xmin, ymax - ymin, xmin, ymin); That saves a lot of work compared to writing to pixel regions and updating shadow tiles! Note Since you re no longer writing to the image using pixel regions, you can eliminate destPR and every line that refers to it. But even better, you can change the gimp_tile_cache_ntiles call to remove the factor of two: you only need half the tile cache. That makes the plug-in use less memory. All done! The new plug-in correctly crops multiple layers. Space doesn t permit a full listing here, but you can download the full source for the Autocrop All plug-in, autocropall.c, in the Source Code area of the Apress website (http://www.apress.com). Summary If you ve made it this far, you re well on your way to becoming a GIMP plug-in writer and if you choose, perhaps a developer for the GIMP itself. You can develop your plug-in authoring skills by exploring the existing scripts and plug-ins, reading the documentation available on the GIMP website, and writing your own new plug-ins. Whether you re tweaking existing scripts, writing quick scripts for your own use, or developing polished plug-ins intended for distribution, don t be afraid to explore and try new things! More than any other part of the GIMP, plug-in writing benefits from good documentation. This book isn t intended to be a complete reference manual on GIMP programming; it only scratches the surface. You ll want to become very familiar with the online documentation and existing tutorials. If you re wondering where to find all these web resources, keep reading. Chapter 12 will discuss the wealth of GIMP information on the web, as well as a few other topics such as GIMP s configuration files, screen shots, and printing.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

CHAPTER 11 PLUG-INS AND SCRIPTING 457 Instead (Web hosting e commerce)

Thursday, April 24th, 2008

CHAPTER 11 PLUG-INS AND SCRIPTING 457 Instead of widthand heightof the drawable, you ll need the width and height of the image (which you can get with gimp_image_width(image_id) and gimp_image_height(image_id)). Inside the loop over the layers, you ll need the width and height of each drawable. To keep from getting confused about which is which, I ve used iwidthand iheightfor the image dimensions, and dwidth and dheight (declared inside the layers loop) for the drawable dimensions. layers is an array of integers, which represent layer IDs. You can get the drawable for each of these layers with gimp_drawable_get(layer_id). Then you can do all the operations that Zealous Crop did on its drawable, including the pixel-region operations. Handling the Edges One at a Time Once everything is set up, rather than looping over the whole width and height of each layer s drawable, you need only explore inward from each of the four image edges. Keep track of the maximum extent of the crop rectangle so far, in image coordinates, using xmin, xmax, ymin, and ymax. Since you aren t looping over the whole drawable, this is very fast; most of the time you ll only need to check a few lines before you find something that can t be cropped. Then you can move on to the next edge. Since the plug-in will no longer loop over the entire image, there s no point in keeping track of area to update the progress bar. It should be sufficient to update the progress bar once after each layer. Update it to the current layer number divided by the total number of layers. That means you can remove areaand total_area from the program. Here is how to find ymax, the bottom edge from the current layer. The other three edges are similar: start = dheight - 1; if (layerOffsetY + dheight > iheight) start = iheight - layerOffsetY - 1; Find the starting point for the loop. The loop should start at the bottom edge of the image, or the bottom edge of the layer, whichever is higher. (Remember, a layer can run off the edge of the image containing it.) dheight is the height of the drawable (the current layer). Since coordinates start at 0, dheight - 1 is the coordinate of the bottom-most pixels in the layer. layerOffsetY + dheight represents the image coordinates of the bottom edge of the layer. If that is greater than the image height, then the image s bottom edge lies off the bottom of the image, and start is adjusted accordingly, to the last visible pixel in the layer. for (y = start; y > 0 && layerOffsetY + y > ymax; y ) Loop backwards (with y in layer coordinates) from the bottom visible pixel in the layer until we either reach the top of the image, or until the image coordinates of the current row (layerOffsetY + y) crosses the ymax we ve already found from some other layer. gimp_pixel_rgn_get_row (&srcPR, buffer, 0, y, dwidth); for (x = 0; x < dwidth * bytes; x += bytes) Get the row at this position, and loop horizontally over the pixels in it. Notice that this isn t checking to see if the pixels are really inside the image boundaries. That s something that should probably be added. if (!colours_equal (buffer, &buffer[x], bytes))
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Sex offenders web site - 456 CHAPTER 11 PLUG-INS AND SCRIPTING If

Wednesday, April 23rd, 2008

456 CHAPTER 11 PLUG-INS AND SCRIPTING If a point in the blue sphere is at image coordinates (XPI, YPI), the point s coordinates within the layer might be much smaller: (XPL, YPL). These points are related by simple addition: X= X+ X PI L PL The coordinate of the point in the image is the coordinate of the layer plus the coordinate of the point in the layer, and likewise for the Y coordinates. If you get confused thinking about coordinate systems, always draw a picture it helps. Which coordinates did Zealous Crop use? It did everything relative to the drawable the layer. So it was always using layer coordinates: the (XPL, YPL) of Figure 11-11. But wait! Could that be why it gets such strange results for images with several layers, as you saw back in Figure 11-10? In fact, that s exactly the problem. Try Zealous Crop on your own multi-layered image, and pay attention to where the layer boundaries begin and end. In the final image, the movement of the layers can be explained by where their layer boundaries start. So for Autocrop All, in addition to looping over all layers, the coordinates of pixels will also need to be handled differently. Setting Boundaries Since Autocrop All doesn t need to crop in the middle of the image, it won t need the arrays killrows and killcols. All it needs is four integers representing the boundaries where the new crop will take place: call them xmin, xmax, ymin, and ymax. xmax is initialized to 1 (the left edge of the image) while xminis initialized to iwidth - 1(the farthest right pixel), and similarly for ymaxand ymin. So the killrows and killcols declarations can be replaced with: gint xmin, xmax, ymin, ymax; livingrows and livingcolscan go away too: we can figure out how many columns will live by subtracting xmax - xmin, and likewise for rows. Right after buffer allocation, the plug-in will need to loop over the image layers. Get the number of layers in the image like this: gint *layers = NULL; gint numlayers; layers = gimp_image_get_layers (image_id, &numlayers); This will set layers to an array of all the layers in the image, and numlayers to the number of layers (the number of items in that array). Tip How do you find out about calls like gimp_image_get_layers? Calls like that aren t in the PDB browser. Happily, gimp.org has a very complete programmer s interface manual online, where you can find details of all the calls needed for plug-ins. See the Additional Resources section of Chapter 12 for more details. gimp_image_get_layers allocates memory, so you should free it when you re finished with it, using g_free(layers).
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Web server on xp - CHAPTER 11 PLUG-INS AND SCRIPTING 455 Fortunately,

Wednesday, April 23rd, 2008

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.