Esempio n. 1
0
    private bool LoadStereoImages()
    {
        bool   success              = false;
        string left_image_filename  = images_directory + "/test_left_" + stereo_image_index.ToString() + ".jpg";
        string right_image_filename = images_directory + "/test_right_" + stereo_image_index.ToString() + ".jpg";

        if (System.IO.File.Exists(left_image_filename))
        {
            if (System.IO.File.Exists(right_image_filename))
            {
                fullres_left        = GtkBitmap.Load(left_image_filename, ref image_width, ref image_height);
                picLeftImage.Pixbuf = GtkBitmap.createPixbuf(image_width, image_height);
                GtkBitmap.setBitmap(fullres_left, picLeftImage);

                fullres_right        = GtkBitmap.Load(right_image_filename, ref image_width, ref image_height);
                picRightImage.Pixbuf = GtkBitmap.createPixbuf(image_width, image_height);
                GtkBitmap.setBitmap(fullres_right, picRightImage);

                success = true;
            }
            else
            {
                //MessageBox.Show("Could not find image " + right_image_filename);
            }
        }
        else
        {
            //MessageBox.Show("Could not find image " + left_image_filename);
        }
        return(success);
    }