//---------------------------------------------------------------------------------------------------------
            /// <summary>
            /// Загрузка изображения по полному пути
            /// </summary>
            /// <param name="file_name">Имя файла</param>
            //---------------------------------------------------------------------------------------------------------
            public void Load(String file_name)
            {
                if (!mFreeImageBitmap.IsNull)
                {
                    mFreeImageBitmap.SetNull();
                }

                // Try loading the file
                mFreeImageFormat = FREE_IMAGE_FORMAT.FIF_UNKNOWN;
                mFreeImageBitmap = FreeImage.LoadEx(file_name, ref mFreeImageFormat);

                try
                {
                    // Error handling
                    if (mFreeImageBitmap.IsNull)
                    {
                        // Chech whether FreeImage generated an error messe
                        if (mCurrentMessage != null)
                        {
                            XLogger.LogErrorFormatModule(MODULE_NAME, "File could not be loaded!\nError:{0}", mCurrentMessage);
                        }
                        else
                        {
                            XLogger.LogErrorModule(MODULE_NAME, "File could not be loaded!");
                        }
                        return;
                    }


                    mFileName = file_name;

                    //
                    // РАЗМЕР ИЗОБРАЖЕНИЯ
                    //

                    // Read width
                    textWidth.Text = String.Format("Width: {0}", FreeImage.GetWidth(mFreeImageBitmap));

                    // Read height
                    textHeight.Text = String.Format("Height: {0}", FreeImage.GetHeight(mFreeImageBitmap));

                    // Read x-axis dpi
                    textDPI.Text = String.Format("DPI: x={0}, y={1}", FreeImage.GetResolutionX(mFreeImageBitmap),
                                                 FreeImage.GetResolutionY(mFreeImageBitmap));

                    //
                    // ПАРАМЕТРЫ ИЗОБРАЖЕНИЯ
                    //

                    // Read file format
                    textFileFormat.Text = String.Format("File Format: {0}", mFreeImageFormat);

                    // Read image type (FI_BITMAP, FIT_RGB16, FIT_COMPLEX ect)
                    textImageType.Text = String.Format("Image Type: {0}", FreeImage.GetImageType(mFreeImageBitmap));

                    // Read color type
                    textColorType.Text = String.Format("Color Depth: {0}", FreeImage.GetColorType(mFreeImageBitmap));

                    //
                    // ПАРАМЕТРЫ ЦВЕТА
                    //

                    // Read file format
                    textColorDepth.Text = String.Format("ColorDepth: {0}", FreeImage.GetBPP(mFreeImageBitmap));

                    // Read file format
                    textPixelFormat.Text = String.Format("PixelFormat: {0}", FreeImage.GetPixelFormat(mFreeImageBitmap));

                    // Read file format
                    textIsTransparent.Text = String.Format("IsTransparent: {0}", FreeImage.IsTransparent(mFreeImageBitmap));

                    //
                    // ПАРАМЕТРЫ МАСКИ
                    //

                    // Read red bitmask (16 - 32 bpp)
                    textRedMask.Text = String.Format("Red Mask: 0x{0:X8}", FreeImage.GetRedMask(mFreeImageBitmap));

                    // Read green bitmask (16 - 32 bpp)
                    textBlueMask.Text = String.Format("Green Mask: 0x{0:X8}", FreeImage.GetGreenMask(mFreeImageBitmap));

                    // Read blue bitmask (16 - 32 bpp)
                    textGreenMask.Text = String.Format("Blue Mask: 0x{0:X8}", FreeImage.GetBlueMask(mFreeImageBitmap));

                    // Получаем презентатор
                    if (mImagePresentator == null)
                    {
                        mImagePresentator = contentViewer.Content as Image;
                    }

                    // Основной режим
                    //mBitmapOriginal = FreeImage.GetBitmap(mFreeImageBitmap).ToBitmapSource();
                    mBitmapOriginal = null;                     // CreateFromHBitmap(FreeImage.GetHbitmap(mFreeImageBitmap, IntPtr.Zero, false));

                    // Если есть прозрачность
                    if (FreeImage.IsTransparent(mFreeImageBitmap) && FreeImage.GetBPP(mFreeImageBitmap) > 24)
                    {
                        // Получаем альфа-канал
                        FIBITMAP bitmap_alpha = FreeImage.GetChannel(mFreeImageBitmap, FREE_IMAGE_COLOR_CHANNEL.FICC_ALPHA);
                        if (!bitmap_alpha.IsNull)
                        {
                            mBitmapAlpha = null;                             // CreateFromHBitmap(FreeImage.GetHbitmap(bitmap_alpha, IntPtr.Zero, false));
                            FreeImage.UnloadEx(ref bitmap_alpha);
                        }

                        // Преобразуем
                        FIBITMAP bitmap_no_transparent = FreeImage.ConvertTo24Bits(mFreeImageBitmap);
                        if (!bitmap_no_transparent.IsNull)
                        {
                            mBitmapNoTransparent = null;                             // CreateFromHBitmap(FreeImage.GetHbitmap(bitmap_no_transparent, IntPtr.Zero, false));
                            FreeImage.UnloadEx(ref bitmap_no_transparent);
                        }

                        radioChannelAlpha.IsEnabled         = true;
                        radioChannelNoTransparent.IsEnabled = true;
                        if (radioChannelOriginal.IsChecked.Value)
                        {
                            mImagePresentator.Source = mBitmapOriginal;
                        }
                        else
                        {
                            radioChannelOriginal.IsChecked = true;
                        }
                    }
                    else
                    {
                        radioChannelAlpha.IsEnabled         = false;
                        radioChannelNoTransparent.IsEnabled = false;
                        if (radioChannelOriginal.IsChecked.Value)
                        {
                            mImagePresentator.Source = mBitmapOriginal;
                        }
                        else
                        {
                            radioChannelOriginal.IsChecked = true;
                        }
                    }

                    mImagePresentator.Width  = FreeImage.GetWidth(mFreeImageBitmap);
                    mImagePresentator.Height = FreeImage.GetHeight(mFreeImageBitmap);

                    if (mImagePresentator.Width > contentViewer.ViewportWidth - 30)
                    {
                        contentViewer.ContentScale = (contentViewer.ViewportWidth - 30) / mImagePresentator.Width;
                    }
                    else
                    {
                        contentViewer.ContentScale = 1.0;
                    }
                }
                catch (Exception exc)
                {
                    XLogger.LogExceptionModule(MODULE_NAME, exc);
                }

                // Always unload bitmap
                FreeImage.UnloadEx(ref mFreeImageBitmap);
            }