View Single Post
  #1  
Old 08-12-2016, 11:30 AM
Cosmin Cosmin is offline
Junior Member
 
Join Date: Mar 2016
Posts: 7
Default libjpeg turbo 64 bit problem

Hi,

I'm trying to use libjpeg turbo in 64 bit with this header conversion: http://www.dev-center.de/header/libj...r&file=libjpeg
Here is a test project: https://www.dropbox.com/s/ktaxet4zgif1xw2/test.zip?dl=0
Just load ReadJPEG.dpr from the Sample folder.
In 32 bit works fine.
In 64 bit I get an access violation on the first call to jpeg_read_header if the debugger is on or on the second call if the debugger is off.

On a russian forum I found half of the answer: http://www.delphimaster.ru/cgi-bin/f...1382877019&n=7 (last message)
Google translation:

Quote:
Thank you, but the problem was not in the header (with Linux, I figured), and in the line:
jpeg.src: = jpeg.mem ^ .alloc_small (@jpeg, JPOOL_PERMANENT, SizeOf (TMySourceMgr));
I skopipastil it from some examples. Under the 32-bit all works under 64 seem to allocate memory, but then falls to jpeg_read_header. Replaced in the allocation standard Delphic means - working.
Could someone help me solve the problem?
Thank you.
Reply With Quote