Beispiel #1
0
 public PictureControl GetPictureControl(byte slotnum)
 {
     PictureControl control = new PictureControl();
     MTPDataResponse result = ExecuteReadDataEx(0x90CC, slotnum, 0);
     if (result.Data != null && result.Data.Length > 30)
     {
         control.IsLoaded = true;
         control.ItemNumber = slotnum;
         control.Monocrome = result.Data[1] == 1;
         control.CustomFlag = result.Data[2];
         string name = Encoding.ASCII.GetString(result.Data, 3, 20);
         control.RegistrationName = name.Contains("\0") ? name.Split('\0')[0] : name;
         if (!control.Monocrome)
         {
             control.QuickAdjustFlag = result.Data[23];
             control.QuickAdjust = (sbyte) result.Data[24];
             control.Saturation = (sbyte) result.Data[25];
             control.Hue = (sbyte) result.Data[26];
         }
         else
         {
             control.FilterEffects = result.Data[23];
             control.Toning = result.Data[24];
             control.ToningDensity = result.Data[25];
             //control.Hue = result.Data[27];
         }
         control.Sharpening = (sbyte) result.Data[27];
         control.Contrast = (sbyte) result.Data[28];
         control.Brightness = (sbyte) result.Data[29];
         control.CustomCurveFlag = result.Data[30];
         if (control.CustomCurveFlag == 1)
             result.Data.CopyTo(control.CustomCurveData, 31);
     }
     else
     {
         return null;
     }
     return control;
 }
Beispiel #2
0
 public void SetPictureControl(PictureControl control)
 {
 }