• Page Description Languages – PDL

    Posted on March 21st, 2009 admin No comments

    Earlier on in history, printers viewed text as text, and graphics as graphics. A page was created from a combination of separate entities. The page images can be created by having raw text like, the word “Hello World”, combined with Escape codes and possibly embedded graphic pictures. Different programs have different file formats.


    To overcome this problem, Page Description Language (PDL) is developed. PDL is a language to describe the graphical representation of ink and toner on sheets of paper (or other output devices, like monitors, photo typesetters, etc) in a higher level than an actual output bitmap.

    Instead of sending raw text to the printer, a PDL output file is created and sent to the printer. Basically PDL instructs the printing device exactly how to handle text, graphics, and pictures in reproducing the page layout created by a computer user. The ‘page’ could be of any size, color, or resolution the printing device can handle.

    By having PDL, an application programmer could concentrate on making his program to output result in a standard PDL – with description of his printable page. The printing device developers could focus on making their devices with related PDL literate.
    Read the rest of this entry »

  • Which image file type to use – GIF, JPEG, PNG

    Posted on March 15th, 2009 admin No comments

    There are quite a number of image file types available such as PNG, GIF, JPEG and etc. What does each of these file types mean, and which format should we use especially in web site?

    In the case of web site design, in order for users to view an image, they need to download it. In this case, slow internet connection or limitation of mail box size is something to be considered. In the worst case, an email system may reject to receive any email that is too big in size. Graphics in their natural state are too big to be quickly downloaded over the Web, so you have to compress them. As such, file size is usually the most important criteria in choosing a format for the web, or to send images by email.

    The other important criterion when choosing an image format is image quality. There is typically a trade off between file size and quality – you can compress an image to a smaller size, however, you may need to sacrifice its quality. So, having a fair balance between loading time and quality of the image is not an easy task.

    GIF — Graphics Interchange Format

    GIF is an indexed format. This means that it uses a fixed list of colors instead of encoding every color separately.

    Graphic images are normally not continuous tone. Graphics are drawings, not photos, and they use relatively few colors, perhaps less than 16 colors in the entire image. GIF is very efficient for images with a small number of colors, like a five-color corporate logo.

    GIF files can be saved with a maximum of 256 colors (This is called as 8-bit color – 256 is 2 to the 8th power). Typical photographs have many more colors than that, so saving a photograph in GIF format will usually result in very poor quality. Even worse, with 256 colors, the file will usually be larger than a full-color JPEG version of the same image! The lesson is clear: don’t use GIF for photographs, only for simple icons and logos.

    The GIF format offers two very useful features: transparency and animation. With transparency, you can make an icon with a clear background. This means that if you place a transparent GIF in a blue table cell, the background color of that image will turn blue. GIF only allow single-bit transparency. This means it does not allow for partial transparency; a pixel is either fully transparent or not transparent at all.

    GIF can be animated – which allows you to create images that move. This is another reason GIF became so successful. Most web browsers support animated GIF images.

    GIF can also be interlaced. This is a way of saving a graphic so that it loads progressively — appear first with poor resolution, low-detail version is loaded, and then successive layers of detail are added. This allow the viewer to get a quick idea of what the picture will look like while waiting for the rest. This is beneficial in many situations, as it gives the impression of a speedier download.

    JPEG – Joint Photographic Experts Group

    The 16-bit JPEG format was designed with photographs in mind. It is capable of displaying millions of colors at once, without the need for dithering, allowing for the complex blend of hues that occur in photographic images. Read the rest of this entry »