mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-23 14:49:13 +02:00
* Implement InternalCheck (By Ondrey Pokorny, Bug ID #29985)
git-svn-id: trunk@33465 -
This commit is contained in:
parent
12f11284bf
commit
1ef0ce2d92
@ -451,11 +451,11 @@ begin
|
||||
end;
|
||||
|
||||
function TFPReaderJPEG.InternalCheck(Str: TStream): boolean;
|
||||
var
|
||||
Buf: array[0..1] of Byte = (0, 0);
|
||||
begin
|
||||
// ToDo: read header and check
|
||||
Result:=false;
|
||||
if Str=nil then exit;
|
||||
Result:=true;
|
||||
if Str=nil then exit(false);
|
||||
Result := (Str.Read(Buf, 2)=2) and (Buf[0]=$FF) and (Buf[1]=$D8); // byte sequence FFD8 = start of image
|
||||
end;
|
||||
|
||||
constructor TFPReaderJPEG.Create;
|
||||
|
Loading…
Reference in New Issue
Block a user