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:
paul 2013-06-10 06:25:08 +00:00
parent 951d803183
commit b7f6c0283e
2 changed files with 7 additions and 7 deletions

View File

@ -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);

View File

@ -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;