pro testzeros,im,kmax,kkmax,lmax,llmax pwr=512 im = bytarr(pwr,pwr) image_1 = bytarr(pwr) coumax=40 ;recherche de lignes zeros kmaxi=-1 kkmaxi=-1 lmaxi=-1 llmaxi=-1 for coupe=0,coumax do begin ;--------------------------- image_1=im(coupe,*) ;------------------ k=0 for j=0,511 do begin if image_1(j) eq 0B then k=k+1 endfor if k eq 512 then kmaxi=coupe image_1=im(511-coupe,*) ;------------------------ kk=0 for j=0,511 do begin if image_1(j) eq 0B then kk=kk+1 endfor if kk eq 512 then kkmaxi=coupe image_1 = im( *, coupe ) ;------------------------ k=0 for j=0,511 do begin if image_1(j) eq 0B then k=k+1 endfor if k eq 512 then lmaxi=coupe image_1=im(*,511-coupe) ;------------------------ kk=0 for j=0,511 do begin if image_1(j) eq 0B then kk=kk+1 endfor if kk eq 512 then llmaxi=coupe ;next coupe endfor kmax= kmaxi kkmax=kkmaxi lmax= lmaxi llmax=llmaxi print,'kmax=',kmax,' kkmax=',kkmax,' lmax=',lmax,' llmax=',llmax return end