示例#1
0
        /// <summary>
        /// Grab an HDR frame from context A and B in rapid succession.Camera is restored to context A when
        /// complete.
        /// </summary>
        /// <returns><c>true</c>, if successful, <c>false</c> otherwise.</returns>
        /// <param name="imageA">Instance of image in which to write the grabbed frame for context A.</param>
        /// <param name="flashA">Required flash power for context A.</param>
        /// <param name="imageB">Instance of image in which to write the grabbed frame for context B.</param>
        /// <param name="flashB">Required flash power for context B.</param>
        public bool GrabMultiple(ImageHDR imageA, byte flashA, ImageHDR imageB, byte flashB)
        {
            bool result = false;

            Psinc.SetContext(this.camera, 0);
            Psinc.SetFlash(this.camera, flashA);

            if (Psinc.GrabHDR(this.camera, imageA.Pointer) == (int)ReturnCodes.Ok)
            {
                Psinc.SetContext(this.camera, 1);
                Psinc.SetFlash(this.camera, flashB);

                result = Psinc.GrabHDR(this.camera, imageB.Pointer) == (int)ReturnCodes.Ok;

                Psinc.SetContext(this.camera, 0);
            }

            return(result);
        }
示例#2
0
 /// <summary>
 /// Sets the flash power (0 for disabled).
 /// </summary>
 /// <param name="power">Power level.</param>
 public bool SetFlash(byte power)
 {
     return(Psinc.SetFlash(this.camera, power) == (int)ReturnCodes.Ok);
 }