Vampyre Imaging Library Forum

Imaging Category => Bugs And Other Insects => Topic started by: izd on 13 September 2012, 11:37:30

Title: Can't load jpeg image
Post by: izd on 13 September 2012, 11:37:30
Hi everybody,

Newbie with Vampyre, I have a problem with loading .jpg image but not with png.
I got an "Runtime error 201" in imjdhuff.pas line 1175
All the dependencies are satisfied (paths), compilation runs fine but app crash on loading :


  if ( FileExists( src ) = True ) then
  begin
    InitImage(img);
    LoadImageFromFile( src, img ); <==== /!\
  end;


/!\ ====> Runtime error

Any idea ?

NOTE: Imaging 0.26.4 , fpc 2.6.0, Lazarus 1.1, Ubuntu 10.04x32
Title: Re: Can't load jpeg image
Post by: izd on 13 September 2012, 14:16:18
Solved !

Just adding the following directives in units where app crash :

{$I-}
{$R-}
{$S-}

See you !
Title: Re: Can't load jpeg image
Post by: Galfar on 13 September 2012, 14:37:49
Thanks for info.

BTW, are you creating GUI or console app in Lazarus? For GUI app Imaging should
automatically use JpegLib from FPC instead of imjdhuff.pas etc.
Title: Re: Can't load jpeg image
Post by: izd on 13 September 2012, 18:44:19
It's console app context.
Title: Re: Can't load jpeg image
Post by: Galfar on 13 September 2012, 21:23:41
And did you try it and it failed with more JPEG files? Or with just one?
Title: Re: Can't load jpeg image
Post by: izd on 14 September 2012, 10:28:23
Yes, I tried with many jpeg images, just in case... ;)

Because it's more comfortable with activated checks options for debugging, I found the same problem with other libraries and solved it by adding these directives directly in source code header.

It's strange behavior but it works like this way !  :o
Title: Re: Can't load jpeg image
Post by: Robaggio on 4 January 2019, 07:54:36
I also have this problem as well.
Title: Re: Can't load jpeg image
Post by: Galfar on 21 January 2019, 17:45:19
Quote from: Robaggio on  4 January 2019, 07:54:36
I also have this problem as well.


Please try the latest version from the repository.