Clase Image


Subject: Clase Image
Debemos crear una variable de tipo "Image"
Private Imagen AS NEW Image


Para visualizar la imagen, se debe utilizar un drawingarea o tranformarla a picture y mostrarla en un picturebox. extraido de la web
El drawingArea debe tener la propiedad "Cached" con el valor "TRUE"

Les voy a indicar como colocar una imagen en un drawingarea.

PUBLIC SUB Form_Open()

imagen = imagen.Load("/home/norberto/Imágenes/100camea/imag0007.jpg")

Draw.Begin(DrawingArea1)
'Draw.image(imagen as image,posisionx as integer,posisiony as integer,[ancho as integer,alto as integer]) ' hay mas valores opcionales,
Draw.Image(imagen, 10, 10, 300, 300)
Draw.End

END


Si queremos rotar la imagen :
'imagen.Rotate(valor as float)
imagen = imagen.Rotate(0.10002129)
Draw.Begin(DrawingArea1)
Draw.Image(imagen, 10, 10, 300, 300)
Draw.End


Para llenar la imagen con un color :
'image.fill(color as integer)
imagen.fill(255)
Draw.Begin(DrawingArea1)
Draw.Image(imagen, 10, 10, 300, 300)
Draw.End

Listado de colores



Además se le puede asignar el contraste, brillo y otros, mediante la propiedad balance :
'image.Balance( Brightness AS Float, Contrast AS Float, Gamma AS Float [ , Channel AS Integer ] )
imagen.Balance(0.20000000, 0, 0) ' en este caso solo le agrego brillo a la imagen
Draw.Begin(DrawingArea1)
Draw.Image(imagen, 10, 10, 300, 300)
Draw.End


Para solarizar una imagen :
'image.Solarize(valor as float)
imagen.Solarize(0.20000000)
Draw.Begin(DrawingArea1)
Draw.Image(imagen, 10, 10, 300, 300)
Draw.End



Mas acerca de la clase Image

Last edited by nrcefe on Monday, 19 October 2009, 20:27; edited 2 times in total
Profile PM  
Subject: Re: Clase Image
Ta guay. pero los enlaces que has puesto a Listado de colores y a mas acerca de la clase image son enlaces a los archivos de tu disco duro y no funcionan.

Profile PM  
Subject: Re: Clase Image

tienes razon, ahora los corrijo

muchas gracias

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo

Generation Time: 0.0997s (PHP: -36% SQL: 136%)
SQL queries: 24 - Debug Off - GZIP Enabled