[Xastir-Dev] Re: [Xastir] geo files again

Chris Bell cbell at junknet.com
Tue May 6 16:46:34 EDT 2003


> 
> > Does anyone know if the ImageMagick API has an easy way to determine
> > image size in pixels?  If so, I could add that in as part of the
> > indexing and this problem would go away.
> > 
> 
> 
> I'll look at it tonight.  I know 'identify -ping' does it pretty
> fast, so I will look there to see how they do it.  
>

That was easy.  I now can check files for their image size if it is
not specified in the geo file.  However: I have a question for the
group... 

What should we do for the case of URLs with no IMAGESIZE tag?  

My current code just does what it used to... ignore the file with a
message about IMAGESIZE.  

Should we:
 1. leave it as is (safest, best performance, kinda pain for users)
 2. fetch the file when indexing (most correct, SLOW, auto for users)

I thought about trying to be clever and estimate the size using the
tiepoints hoping they would be reasonably near edges, then fixing it
if we ever really load the image, but I notice that the code never
bothers to check if the image really is what the IMAGESIZE tag says it
is... Besides, by the time we actually fetch the image, we have
already done all the calculations assuming the sizes.  

I also fixed a bug: You can now put absolute paths in a geo FILENAME
tag, so the image file does not need to be in the same directory as
the geo file.  [this helps me: I can create geo files for images on
cdrom from other programs, like "Topo!" without copying the whole
thing to disk.]

It is not checked in yet, I am still checking some boundry conditions
and all my various test platforms.  

Chris.



More information about the Xastir-dev mailing list