• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Can't load jpeg image

Started by izd, 13 September 2012, 11:37:30

Previous topic - Next topic

izd

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

izd

Solved !

Just adding the following directives in units where app crash :

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

See you !

Galfar

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.

izd


Galfar

And did you try it and it failed with more JPEG files? Or with just one?

izd

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

Robaggio


Galfar

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.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk