ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ParamFromBuffer

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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