Problem with reading BMP with Visual Fortran

92 views
Skip to first unread message

Arkadiusz Jadczyk

unread,
Feb 10, 2013, 4:20:06 AM2/10/13
to dislin...@googlegroups.com
Hi,
I have just installed DISLIN and test graphics examples run ok with Intel VF. However, when I am trying to read a bmp image via this simple code that I found on the net

program Console4
USE DISLIN
integer*1  IRAY(184626)
call meatafl('CONS')
call disini
call incfil("h:\fb.bmp")
call imgmod('rgb')
call imgini
call rpixls (iray,0,0,789,780)
call imgfin
call disfin

The code would not compile with the messege: error #6633: The type of the actual argument differs from the type of the dummy argument.   [IRAY]
Probably I am making some simple newbie type error. Although I am new to Fortran, my other Fortran programs run ok. Help will be uppeciated

Arkadiusz Jadczyk

unread,
Feb 10, 2013, 5:56:09 AM2/10/13
to dislin...@googlegroups.com
Progress: With these changes it compiles, but shows a totally black image - why so?

USE DISLIN
implicit none

character*1  BRAY(1846260)
call METAFL("CONS")
call DISINI
call INCFIL("h:\fb.bmp")
call IMGMOD("RGB")
call IMGINI
call RPIXLS (BRAY,0,0,789,780)
call IMGFIN
call DISFIN

Arkadiusz Jadczyk

unread,
Feb 10, 2013, 6:00:40 AM2/10/13
to dislin...@googlegroups.com
Solved: the BMP was 24 bit. It needs to be 8 bit.

Helmut Michels

unread,
Feb 11, 2013, 4:43:22 AM2/11/13
to dislin...@googlegroups.com
Hi,


Am Sonntag, 10. Februar 2013 12:00:40 UTC+1 schrieb Arkadiusz Jadczyk:
Solved: the BMP was 24 bit. It needs to be 8 bit.

INCFIL should work for 24-bit and 8-bit BMP files. Perhaps, you can send a
copy of the 24-bit BMP file to me to check why you are getting just a black image.

Best regards,

Helmut
 

Arkadiusz Jadczyk

unread,
Feb 11, 2013, 5:12:16 AM2/11/13
to dislin...@googlegroups.com
Thanks, but I am not able to reproduce this phenomenon. First I was getting black image with BMP saved from PS. I saved it from PaintNet and then it worked both in 8 and 24 bit format. Today I saved again from PS as 24 bit, and it displays the image ok. A mystery. Like there was a mystery with me using capital letters vs lower case letters in the code. I thought that the case should not matter, but somehow, at some places it seems to matter.
Reply all
Reply to author
Forward
0 new messages