I've attached the dll, i use fpc 3.0.4 with lazarus 2.0.0 - compiled on windows for win32 api.
Regarding the debugger, crash happens also when ran without debugger.
The squish dll is simple - just point the source and dest to a large enough buffers, the input can be garbage too, for example call compress on random memory stream data (each pixel is 4 bytes), and have output same size buffer.
Here is an example call, with the dll i attached:
procedure Twnd_workshop.btn1Click(Sender: TObject);
const
iwidth = 128;
iheight = 128;
var
inimage: Tmemorystream;
datastream: Tmemorystream;
gsr: integer;
begin
inimage:= TMemoryStream.Create();
inimage.Size:= (iwidth * iheight) * 4;
gsr:= GetStorageRequirements(iwidth, iheight, kDxt3 or kColourIterativeClusterFit);
datastream:= TMemoryStream.Create(); // output stream
datastream.Size:= gsr;
CompressImage(inimage.memory, iwidth, iheight, datastream.Memory, kDxt3 or kColourIterativeClusterFit, nil);
end;
This will work perfectly in delphi 7, but crash very strangely if compiled with freepascal.