If I do the above then LoadFromBuffer works (gets the correct x & Y pixel counts), but after a few hundred (it varies) iterations my program hangs
If I replace LoadFromBuffer with LoadParamsFromBuffer then the program doesnt hang but I get the same pixel count for every file.
if i comment out loadfrombuffer/loadparamsfrombuffer the program rusn OK - so something is a miss either in ImaegEn or is causing ImageEn to hang.
I am calling ImageEn in a thread and I pass a TImageEnView object to it from the calling (main) process - I am not sure if this is where the issue is, and I dont know (have not tried to see) whether I can create a timageenview that does not attach to a visual component.
quote:I am calling ImageEn in a thread and I pass a TImageEnView object to it from the calling (main) process - I am not sure if this is where the issue is, and I dont know (have not tried to see) whether I can create a timageenview that does not attach to a visual component.
You should create (and destroy) the TImageEnView inside your thread. Actually, if you only need to get Width and Height you could use only TImageEnIO.ParamsFromBuffer (still creating/destroying TImageEnIO inside the thread).