Delphi Error - JPEG # 53

TImage.Picture.LoadFromFile ('File.jpg');

but I got JPEG error # 53 ! what is the reason for this error?

+3
source share
5 answers

my problem is solved using the TAdvPicture componentenet.

-4
source

Is there a single jpeg image or all the jpeg you are trying to make?

JPEG error # 53 error will occur due to insufficient memory.

If the file is damaged, this error may occur.

Thus, opening this image in paint or photoshop and re-saving it in jpeg can solve the problem.

+4
source

, Jpeg , 100%. TImage. , Jpeg .

, , - , , " ".

:

procedure JpegError(cinfo: j_common_ptr); {$IFDEF LINUX} cdecl; export; {$ENDIF}
begin
  raise EJPEG.CreateFmt(sJPEGError,[cinfo^.err^.msg_code]);
end;

sJPEGError = 'JPEG error #%d';

EJPEG # 53 .

EJPEG EInvalidGraphic,

catch
  on E: EInvalidGraphic do
  begin
    ShowMessage('Image file is corrupted.')
  end;
end;
+4

, " JPEG # 53", TImage.Picture.LoadFromFile('File.jpg')

TImage.Picture.Bitmap.LoadFromFile('File.jpg');

, File File.jpg .

+1

I also had error # 53. It turned out that the error only happened after I mistakenly saved a bitmap with the extension * .jpg. The obvious solution was to turn this bitmap into jpeg and save it then :-).

0
source

Source: https://habr.com/ru/post/1760487/


All Articles