[Tutor] [tutor] Finding image statistics
Kent Johnson
kent37 at tds.net
Mon Mar 10 02:41:17 CET 2008
Varsha Purohit wrote:
> Hello All,
> I had posted this question in this community. I have a trouble.
> Actually in my application i need to multiply the resultant value i am
> getting with a cellsize. I am getting this cellsize by reading an ascii
> file's header. But when i am trying to multiply it with the result of
> imagestat i am getting an error.
> temp= hdr[4].strip().split() # temp is a list which is ['cellsize',
> '127']
> cellsize = temp[1]
Here cellsize is a string, not an integer. Try
cellsize = int(temp[1])
> i am getting an error that i cannot combine imagestat with cellsize and
> i cannot multiply it like that.
It's very helpful if you show us the exact error, including the
traceback. Just copy the entire error message and paste it into your email.
Kent
More information about the Tutor
mailing list