How to Color an Image
-
Hi,
How to color an image using quick 1.1.In quick 2.0,it is done using ColorOverlay,But i want it to be done in Quick 1.1.
Thanks in Advance
-
I doubt it is possible by using only QML in Quick 1.1.
-
Hey,
do you want to do it only using QML or may be a mix of c++ and QML an option?
-
Can anyone please suggest a approach that could meet above requirement.
Thanks
-
One option may be to use the fact that Quick 1.1. is based on QGraphicsView and friends. That means that you can also use other things that work in QGraphicsView, including... QGraphicsEffect and its subclasses.
I think I'd try to create my own QML element that encapsulates a QGraphicsColorizeEffect, and apply it to the parent item. Doesn't sound all that difficult to do.
You start by creating a QDeclarativeItem subclass, that you expose to the QML engine by calling qmlRegisterType for it, and then using the appropriate import in your QML file.
-
Hi ,
we can mix c++ and QML. If we can do it in QML, it is more helpful.
Thanks
-
Sorry, i don't know of a method on how to do it with QtQuick 1.1 only, but you might check out "ShaderEffectItem":http://qt-project.org/doc/qt-4.8/qml-shadereffectitem.html . Maybe this could help you to solve your problem. Otherwise you can modify your image(colorize it and so on...) in C++, pass it back to QML and display it.
-
Thank you all.I Solved it by registering QGraphicsColorizeEffect and applying effect for QML Image.