mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 17:52:42 +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;
|
DefaultFileExt: String;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
DefaultFileExt:=GetFileExtensions;
|
DefaultFileExt := GetFileExtensions;
|
||||||
i:=1;
|
i := 1;
|
||||||
while (i<=length(DefaultFileExt)) and (DefaultFileExt[i]<>';') do
|
while (i <= Length(DefaultFileExt)) and (DefaultFileExt[i] <> ';') do
|
||||||
inc(i);
|
inc(i);
|
||||||
if i<=length(DefaultFileExt) then
|
if i <= Length(DefaultFileExt) then
|
||||||
DefaultFileExt:=copy(DefaultFileExt,1,i);
|
DefaultFileExt := copy(DefaultFileExt, 1, i - 1);
|
||||||
Result:='image/'+DefaultFileExt;
|
Result := 'image/' + DefaultFileExt;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPImageBitmap.InitializeReader(AImage: TLazIntfImage; AReader: TFPCustomImageReader);
|
procedure TFPImageBitmap.InitializeReader(AImage: TLazIntfImage; AReader: TFPCustomImageReader);
|
||||||
|
@ -46,7 +46,7 @@ end;
|
|||||||
|
|
||||||
class function TJPEGImage.GetFileExtensions: string;
|
class function TJPEGImage.GetFileExtensions: string;
|
||||||
begin
|
begin
|
||||||
Result := 'jpg;jpeg;jpe;jfif';
|
Result := 'jpeg;jpg;jpe;jfif';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TJPEGImage.GetReaderClass: TFPCustomImageReaderClass;
|
class function TJPEGImage.GetReaderClass: TFPCustomImageReaderClass;
|
||||||
|
Loading…
Reference in New Issue
Block a user