Creating small XAR and WEB files

The XAR and WEB file formats have been designed to be very compact. If you know some of the mechanisms used to make the formats compact, you can create complex, colorful, high quality illustrations that are a fraction, perhaps just a tenth, of the size of an equivalent GIF or JPEG. And remember that a file the tenth the size, means your viewers can access your Web pages ten times faster!

The basic rule is that the more shapes and more complexity in the illustration, the larger the file. Using bitmaps is bad news because they are saved as GIF or JPEG images in the XAR or WEB file. This removes the advantages of the compact format. (Although you can do things with these bitmaps, like make them semi-transparent, that you cannot do with plain JPEG and GIFs.) The file is made up from the vector descriptions (at 72,000 dpi) of all the points in the lines or outlines of the objects. Therefore the more objects you have, or the more complex those shapes are (the more points on the line), the larger the file becomes.

Points to keep XAR or WEB files small

Keep the number of different shapes to a minimum.

Keep the number of points on shapes to a minimum.

Use fractal fills, and graduated fills and overlaid transparency fills to create complex shading. These all use practically no file space.

Use blends. Xara LX uses zero-memory blends meaning all the in-between steps in the blend require no file space! Therefore complex shading or highlights can be done very efficiently this way. Also any repeating pattern can be done with blends.

Use duplicated, cloned or copied shapes - WEB and XAR files identify identical shapes used in the drawing and eliminate all the data for the copies. Xara LX then reconstructs these shapes when displaying the image. Therefore liberal use of cut, copy, paste to create your drawing is a good thing.

Text. Use the typical system fonts that are likely to be available on the viewer machine. This means mainly Times and Arial (Helvetica) because these two are almost guaranteed to be available on the computer viewing the image. You can transform, stretch, rotate, skew, color the text or even give it thick outlines and graduated colors etc. This takes very little file space but still gives you a huge variety of stylistic options.

If you do use bitmaps, always save the document in WEB format as this has the option to JPEG compress any bitmaps in the document. Bitmap sizes can often dramatically increase the file size of XAR and WEB files if you're not careful. When viewing images at normal size on the computer screen, it is never necessary to have bitmaps of more than 96 dpi (the resolution of the screen). Often it's quite acceptable to use bitmaps of a much lower resolution . Reducing the resolution of bitmaps in your illustrations and then saving as WEB files with JPEG compression, makes vast savings on file size. (See Reducing the resolution of bitmaps and bitmap fills for information on reducing the bitmap resolution of a bitmap using LX's built-in facilities.)

Other points to watch

Text other than Arial, Courier or Times (or the bold and italic versions) should be converted to outlines before saving to be sure that another font is not substituted. When exporting as WEB format, there is a switch on the Export dialog that converts all other fonts to outlines. When the viewer or plug-in can't find the equivalent font, it intelligently substitutes the closest available font using the PANOSE
font matching system.

The physical size of the drawing does not matter. A major advantage of vector formats is that an illustration occupying a large full screen window takes no longer to download than the same image displayed as only a few pixels across in the corner of the window. This completely unburdens the designer from the size constraints that restrict GIF and JPEG graphics.

If you do not want to lose detail in your bitmaps, you can use XAR file and include the bitmap at any required resolution you like. By creating a XAR files containing only a JPEG, you can zoom into any region using the Xara plug-in, something that you don't normally get with plain JPEGs. And it will not take any more file space. An alternative is to export as WEB format and switch the JPEG Compress bitmaps option off. This will PNG compress them instead which is a distortion-free but less efficient compression mechanism.

_______________

Related Topics