// Builds the front and back side bitmaps
        // --------------------------------------------------------------------------------------------------

        private bool BuildBitmaps()
        {
            ZMotifGraphics g = new ZMotifGraphics();

            bool builtOk = true;

            try
            {
                // Gets images from files

                if (_isZXP7)
                {
                    FrontImage = "ZXP7Front.bmp";
                }
                else
                {
                    FrontImage = "ZXP8Front.bmp";
                }

                byte[] imgFront = g.ImageFileToByteArray(_nameFrontImage);
                byte[] imgBack  = g.ImageFileToByteArray(_nameBackImage);

                // Initializes the graphic buffer for the front side

                g.InitGraphics(0, 0, ZMotifGraphics.ImageOrientationEnum.Landscape,
                               ZMotifGraphics.RibbonTypeEnum.Color);

                // Draws text and image into the graphic buffer for front side

                g.DrawImage(ref imgFront, ZMotifGraphics.ImagePositionEnum.Centered, 1000, 620, 0);
                g.DrawTextString(50, 580, "Front Side: Color Image", "Arial", 10,
                                 ZMotifGraphics.FontTypeEnum.Regular, g.IntegerFromColorName("Navy"));

                // Creates the front side bitmap

                int dataLen;
                _bmpFront = g.CreateBitmap(out dataLen);

                // Clears the graphics buffer

                g.ClearGraphics();

                // Initializes the graphic buffer for the back side

                g.InitGraphics(0, 0, ZMotifGraphics.ImageOrientationEnum.Landscape,
                               ZMotifGraphics.RibbonTypeEnum.MonoK);

                // Draws text an image into the graphic buffer for the back side

                g.DrawImage(ref imgBack, ZMotifGraphics.ImagePositionEnum.Centered, 1000, 620, 0);
                g.DrawTextString(50, 580, "Back Side Monochrome Image", "Arial", 10,
                                 ZMotifGraphics.FontTypeEnum.Regular, g.IntegerFromColorName("Black"));

                // Creates the back side bitmap

                _bmpBack = g.CreateBitmap(out dataLen);

                g.ClearGraphics();
            }
            catch
            {
                builtOk = false;
            }
            return(builtOk);
        }