mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
lcl: skip ';' char from extension when generating a mime-type, use 'jpeg' instead of 'jpg' as the first extension (issue #0024488)
git-svn-id: trunk@41647 -
This commit is contained in:
parent
951d803183
commit
b7f6c0283e
@ -52,13 +52,13 @@ var
|
||||
DefaultFileExt: String;
|
||||
i: Integer;
|
||||
begin
|
||||
DefaultFileExt:=GetFileExtensions;
|
||||
i:=1;
|
||||
while (i<=length(DefaultFileExt)) and (DefaultFileExt[i]<>';') do
|
||||
DefaultFileExt := GetFileExtensions;
|
||||
i := 1;
|
||||
while (i <= Length(DefaultFileExt)) and (DefaultFileExt[i] <> ';') do
|
||||
inc(i);
|
||||
if i<=length(DefaultFileExt) then
|
||||
DefaultFileExt:=copy(DefaultFileExt,1,i);
|
||||
Result:='image/'+DefaultFileExt;
|
||||
if i <= Length(DefaultFileExt) then
|
||||
DefaultFileExt := copy(DefaultFileExt, 1, i - 1);
|
||||
Result := 'image/' + DefaultFileExt;
|
||||
end;
|
||||
|
||||
procedure TFPImageBitmap.InitializeReader(AImage: TLazIntfImage; AReader: TFPCustomImageReader);
|
||||
|
@ -46,7 +46,7 @@ end;
|
||||
|
||||
class function TJPEGImage.GetFileExtensions: string;
|
||||
begin
|
||||
Result := 'jpg;jpeg;jpe;jfif';
|
||||
Result := 'jpeg;jpg;jpe;jfif';
|
||||
end;
|
||||
|
||||
class function TJPEGImage.GetReaderClass: TFPCustomImageReaderClass;
|
||||
|
Loading…
Reference in New Issue
Block a user