Silverfrost Forums

Welcome to our forums

Help with IMPORT_IMAGE@

18 Dec 2025 4:21 (Edited: 29 Dec 2025 5:28) #32566

I am using FNT95 8.10 and am unable to read a file into a graphics area, without using a resource control (which can't be used since the name of the file is unknown at compile time).

If I enclose the file name in curly brackets, I get an error: Curly bracket/integer form is not available in this context

Any ideas?

winapp
program testa_imagem
include <windows.ins>
integer :: i,ctrl,rslt,handle_img
    rslt=winio@('%ww%ca[Teste]&amp;')
    rslt=winio@('%`gr[grey,rgb_colours]&amp;', &amp;
                600,600,handle_img)
    rslt=winio@('%lw',ctrl)
    i=select_graphics_object@(handle_img)
    i=import_image@('{600x600 pixel square.jpg}',0,0)
    print *,'i=',i
end program testa_imagem
19 Dec 2025 12:53 #32572

I think handle_img has to be assigned a value by the programmer before winio@ calls with %gr

19 Dec 2025 12:59 #32573

Indeed! Many thanks!

Please login to reply.