dukus / digiCamControl

DSLR camera remote control open source software
http://digicamcontrol.com/
Other
675 stars 227 forks source link

RAW + JPEG #279

Open macro63 opened 7 years ago

macro63 commented 7 years ago

My interest in this program is for macro-photography. I always use Raw + Jpeg quality setting on my Canon camera. So I set Compression on the first screen in this application to 'RAW + Large fine JPEG' and Transfer to "Save to camera only' then clicked Live View button, double-clicked the screen, the lens focused, then clicked Capture and an error message appeared at bottom right of the screen 'RAW + JPG capture in live view is not supported'. Which is wrong as my camera can do this without this program. So I searched through the files and found the code responsible

    public override void CapturePhotoNoAf()
    {
        Log.Debug("EOS capture start");
        Monitor.Enter(Locker);
        try
        {
            if (Camera.IsInHostLiveViewMode && Camera.ImageQuality.SecondaryImageFormat != EosImageFormat.Unknown)
            {
                throw new Exception("RAW+JPG capture in live view not supported");
            }

and changed it to this ......

    public override void CapturePhotoNoAf()
    {
        Log.Debug("EOS capture start");
        Monitor.Enter(Locker);
        try
        {
            if (Camera.IsInHostLiveViewMode && (Camera.ImageQuality.SecondaryImageFormat != EosImageFormat.Unknown))
            {
                if (Camera.ImageQuality.SecondaryImageFormat != EosImageFormat.Jpeg)
                {
                    throw new Exception("RAW+JPG capture in live view not supported");
                }
            }

now my camera works perfectly. I can also set Transfer to 'Save to PC and camera' and this works as well. I get a .cr2 file and a .jpg file on my PC as well as the SD card in the camera. But the files on the pc are numbered 1.cr2 and 2.jpg Please can you tell me where in the 30000+ lines of code (file, line number) where you increment the image number when it is saved to the PC, so I can fix this up as well. Cheers.

dukus commented 7 years ago

Hi check this https://github.com/dukus/digiCamControl/blob/master/CameraControl/MainWindow.xaml.cs#L510