I'm not sure about the following: To allocate storage for an image, I need of course the amount of bytes = size of the image. This is calculated via 'rows * columns * bits / 8', giving the result in [bytes]. No look at the following example of a really big image, 12000 rows by 12000 columns with 24 bits per pixel:
program test
IMPLICIT NONE
integer*4 i,j,zei,spa,bit
zei = 12000
spa = 12000
bit = 24
j = zei*spa*bit/8
print*,j
i = bit/8
j = zei*spa*i
print*,j
end
The first 'printj' gives an incorrect value, the second a correct one. I think that 'zeispabit' (bevor '/8') gives a value too big for an integer4 variable - but why there is no error message??
Wilfried