PROCEDURE SelecionaImagem(Janela, ControleImagem,bResize is boolean)
bufImagebuffer is Buffer
sFile is string = fSelect("c:\", "Selecione uma Foto...", "Todos os arquivos (*.*)" + TAB + "*.*" + CR + "PNG" + TAB + "*.PNG" + CR + "JPEG" + TAB + "*.JPEG" + CR + "JPG" + TAB + "*.JPG", "*.*")
IF fFileExist(sFile) = True bufImagebuffer = fLoadBuffer(sFile) sControlTelaImg is string = Janela +"."+ ControleImagem //monta a string do indirection {sControlTelaImg,indControl} = bufImagebuffer IF bResize = True dResize({sControlTelaImg,indControl},{sControlTelaImg,indControl}..Width,{sControlTelaImg,indControl}..Height,drHomotheticCentered) END ELSE Info("Nenhum arquivo selecionado!") END
RESULT bufImagebuffer //CASE ERROR: // CASE EXCEPTION: |