View Single Post
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


I'm trying to use libjpeg turbo in 64 bit with this header conversion:
Here is a test project:
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: (last message)
Google translation:

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