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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Detecting if TIFF is Tiled
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ronald

Netherlands
17 Posts

Posted - Feb 01 2015 :  11:06:08  Show Profile  Reply
Hello,

Anyone who knows how to detect if a tiff file image layout is tiled, without loading the image (which can be slow for big files)?

I could not find a suitable function in tiff functions, nor IO.Params.

Regards, Ronald

xequte

38616 Posts

Posted - Feb 01 2015 :  17:04:17  Show Profile  Reply
Hi Ronald

Sorry can you explain in more detail, or post an example image.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

Ronald

Netherlands
17 Posts

Posted - Feb 02 2015 :  04:46:04  Show Profile  Reply
Hi Nigel,

Download link for sample image is sent to you via e-mail.

Regards, Ronald
Go to Top of Page

xequte

38616 Posts

Posted - Feb 02 2015 :  15:24:47  Show Profile  Reply
Hi Ronald

If you cannot control the source of the images, then I cannot see any ImageEn functionality that would detect an image of this sort.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

Ronald

Netherlands
17 Posts

Posted - Feb 03 2015 :  05:32:47  Show Profile  Reply
Hi Nigel,

Class TTIFFReaderContext contains members TileWidth and TileHeight. If values are not the same as ImageWidth and ImageHeight, then image is tiled.

What I do not understand is: get those values from a tiff file without loading the image data?

Regards, Ronald
Go to Top of Page

xequte

38616 Posts

Posted - Feb 03 2015 :  22:17:26  Show Profile  Reply
Hi Ronald

You're right, there is some functionality in ImageEn to handle TIFF tiles (e.g. IO.Params.TIFF_GetTile). Unfortunately to load the header data without the image would require TImageEnIO.ParamsFromFile, which does not expose the TileWidth and TileLength tags.

Let me consult with Fabrizio who may have some suggestions.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

xequte

38616 Posts

Posted - Feb 05 2015 :  03:37:03  Show Profile  Reply
Hi Ronald,

Sorry I neglected TIETIFTagsReader. You should be able to use:

with TIETIFTagsReader.CreateFromFile(’test.tif', 0) do
begin
  TileWidth  := GetInteger(322);
  TileLength := GetInteger(323);
  Free();
end;



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: