fpexif: Set WriteJFIFandEXIF after reading a file so that existing segments are preserved.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7428 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-05-03 20:55:56 +00:00
parent 7e70201620
commit abb796c0b2

View File

@ -465,6 +465,7 @@ var
reader: TBasicMetadataReader;
bigEndian: Boolean;
hdr: TBytes;
hasJFIF: Boolean;
{$IFNDEF FPC}
sa: ansistring;
{$ENDIF}
@ -568,6 +569,7 @@ begin
Move(hdr[SizeOf(TJpegJFXXSegment)], FJFXXThumbnail[0], Length(FJFXXThumbnail));
end;
end;
hasJFIF := true;
end;
M_SOF0:
begin
@ -584,6 +586,9 @@ begin
end;
AStream.Position := p + size;
end;
// Force writing of JFIF if it coexists with EXIF.
FWriteJFIFandEXIF := hasJFIF and HasExif;
end;
procedure TImgInfo.ReadTiff(AStream: TStream);