An update, and some programs seem to default the dpi to 96.
winapp
program getfiles
character*1000 lv_items
common/bmp_text/lv_items(0:1000)
common/bmp_numb/isel(1000),iview
external iget_files
lv_items = ' '
lv_items(0) = '|Name_120|Id_30|FileSize_60|Starts at_60|Width_60|Height_60'// &
'|Planes_60|Bit/pix_60|Comp_60|Size_60|Hres_60|Vres_60'
isel = 0
isel(1) = 1
iview = 1
i=winio@('%ca[BMP file properties]&')
i=winio@('%bg[btnface]%ww&')
i=winio@('%mn[Files]&',iget_files)
i=winio@('%ff%lv&',760,250,lv_items,1001,isel,iview)
i=winio@(' ')
end
integer*4 function iget_files()
C_EXTERNAL GET_MULTIPLE_FILENAMES@ 'get_multiple_file_names'(VAL,INSTRING,STRING,VAL,INSTRING,INSTRING,VAL):LOGICAL
logical L,next
character*256 filename,filter,defpath
character*1000 lv_items
common/bmp_text/lv_items(0:1000)
common/bmp_numb/isel(1000),iview
iget_files = 1
filter = 'Bitmap files (*.bmp)'//char(0)//'*.bmp'//char(0)//char(0)
defpath = char(0)
L = .TRUE.
next = .FALSE.
ifile = 0
lv_items(1:1000) = ' '
do while(L)
filename = char(0)
L=GET_MULTIPLE_FILENAMES@(0,'Dialog Title',filename,256,filter,defpath,next)
next = .TRUE.
if(L) then
ifile = ifile + 1
call BMP_Properties(filename,ifile)
endif
end do
end
subroutine BMP_Properties(file,i)
character*(*) file
type bmp_header
sequence
character*2 id
integer*4 isize
integeR*4 reserved
integer*4 data_start
integer*4 header_size
integer*4 width
integer*4 height
integer*2 planes
integer*2 colour_depth
integer*4 compression_method
integer*4 image_size
integer*4 horiz_rez
integer*4 vert_res
end type bmp_header
type (BMP_header) bmp
character*1000 lv_items
common/bmp_text/lv_items(0:1000)
common/bmp_numb/isel(1000),iview
open(unit=10,file=file,access='transparent')
read(10)bmp
close(unit=10)
ipos_slash = max(1,index(file,'\',BACK=.true.))+1
lv_items(i) = '|'//file(ipos_slash:)
ipos=leng(lv_items(i))+1
write(lv_items(i)(ipos:),1000)bmp%id, bmp%isize, bmp%data_start, &
bmp%width, bmp%height, bmp%planes, bmp%colour_depth, bmp%compression_method, &
bmp%image_size, bmp%horiz_rez, bmp%vert_res
1000 format('|',a,11('|',i8))
end