Mostrando entradas con la etiqueta image. Mostrar todas las entradas
Mostrando entradas con la etiqueta image. Mostrar todas las entradas

lunes, 19 de octubre de 2020

Measure the amount of color in the picture

 If you want to measure the amount of color an image has (in percentage), you can use the following repo:


https://github.com/Eitol/document_color_meter

sábado, 14 de marzo de 2015

Ajustar imagen a Qlabel en Qt

Para hacer que una imagen se ajuste al tamaño de un QLabel se debe modificar su stylesheet.

Para ello se le da botón secundario al label desde el editor de UI



Luego se agrega la siguiente lineal:
border-image: url(:/URL_DE_LA_IMAGEN) 0 0 0 0 stretch stretch;



y Listo

Antes

Despues

Si lo quiere hacer desde código deberías hacer:

label->setStyleSheet("border-image: url(:/URL_DE_LA_IMAGEN) 0 0 0 0 stretch stretch;");.