mostrar bmp
Publicado por antonio (36 intervenciones) el 22/10/2015 13:49:46
Hola tengo un programa en xbase y necesito mostrar un fichero bmp en pantalla, como se hace?
gracias anticipadas
gracias anticipadas
Valora esta pregunta


0
PROCEDURE Main()
LOCAL oBmp, nWidth, nHeight
// Crea un objeto XbpBitmap y carga el archivo BMP
oBmp := XbpBitmap():new()
oBmp:createFromFile("ruta/archivo.bmp")
// Obtiene las dimensiones del BMP cargado
nWidth := oBmp:width()
nHeight := oBmp:height()
// Crea una ventana para mostrar el BMP
CREATE WINDOW WinWidth, WinHeight TITLE "Imagen BMP"
ACTIVATE WINDOW WinWidth
SET WINDOW WinWidth SIZE nWidth, nHeight
// Dibuja el BMP en la ventana
DRAW OBJECT oBmp TO WinWidth
READ // Espera hasta que el usuario cierre la ventana
// Limpia la ventana y libera los recursos
SET WINDOW WinWidth OFF
RELEASE oBmp
RETURN