Skip to content

Commit

Permalink
Fix YBAYROFF when the ASCOM image is flipped vertically
Browse files Browse the repository at this point in the history
  • Loading branch information
pchev committed Dec 8, 2019
1 parent 3cde70e commit 7af3443
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cu_camera.pas
Expand Up @@ -293,7 +293,7 @@ constructor T_camera.Create(AOwner: TComponent);
FIndiTransfertDir:=defTransfertPath;
FIndiTransfertPrefix:='ccdciel_tmp';
FVerticalFlip:=false;
FASCOMFlipImage:=true;
FASCOMFlipImage:=false;
FStatus := devDisconnected;
FFilterNames:=TStringList.Create;
FImgStream:=TMemoryStream.Create;
Expand Down Expand Up @@ -629,7 +629,11 @@ procedure T_camera.WriteHeaders;
end;
CType:='';
try
if FhasCfaInfo then CfaInfo(OffsetX,OffsetY,CType);
if FhasCfaInfo then begin
CfaInfo(OffsetX,OffsetY,CType);
if FASCOMFlipImage and (not odd(FCameraYSize)) then
OffsetY:=(OffsetY+1) mod 2;
end;
except
end;
// write new header
Expand Down

0 comments on commit 7af3443

Please sign in to comment.