T O P I C R E V I E W |
sandy771 |
Posted - Mar 08 2013 : 15:39:16 What params does it actually get?
I am trying to get the dimensions (x and y pixels) and the number of colours in a file. |
5 L A T E S T R E P L I E S (Newest First) |
sandy771 |
Posted - Mar 13 2013 : 08:59:48 That worked fabrizio - thanks |
sandy771 |
Posted - Mar 12 2013 : 11:20:25 Thanks fabrizio - I'll give that a go.
I will probably want to get at exif data at some point a swel... |
fab |
Posted - Mar 12 2013 : 11:14:17 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). |
sandy771 |
Posted - Mar 11 2013 : 15:32:53 Thanks Nigel
In that case I am seeing some very odd behaviour - perhaps you can select some light on it.
I have a loop which loads data from a series of files into a buffer and then attempts to get the x and y pixel count.
essentially
do{ ReadFile(buf, filesize); IO->LoadFromBuffer(buf, filesize, ioUnknown); nextfile; }
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.
Any ideas?
Thanks |
xequte |
Posted - Mar 09 2013 : 12:31:26 Hi
It will fill the "Params" property of the TImageEnIO:
http://www.imageen.com/help/TImageEnIO.Params.html
So you can then access:
ImageEnIO1.Params.Width ImageEnIO1.Params.Height ImageEnIO1.Params.BitsPerSample ImageEnIO1.Params.SamplesPerPixel
Nigel Xequte Software www.xequte.com nigel@xequte.com |