<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Image Correction in QML]]></title><description><![CDATA[<p dir="auto">I have written the code for loading the image(.jpg,.jpeg,.png format) from the filebrowser and display the image using Image compoennt in QML. But,the image that is appearing in the display window of QML is splitted.</p>
<p dir="auto">This is the original Image:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/a660d2b3-e821-4666-8964-ad1f6108aa78.jpg" alt="11.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">and this is the image that is being displayed in QML window:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/fc031f7f-6100-4944-bdda-7d3edbe7380b.png" alt="Screenshot 2024-04-09 121435.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">and this is my image element coded in QML:</p>
<pre><code>Image{
        id: image
        width:parent.width
        height:parent.height
        anchors.centerIn: parent
        fillMode: Image.PreserveAspectFit
        property bool counter: false
        visible: true
        source: "image://live/image"
        asynchronous: false
        smooth: true
        cache: false
}
</code></pre>
<p dir="auto">Some images are correctly appearing but some not..why?How to resolve this image splitting issue</p>
]]></description><link>https://forum.qt.io/topic/155910/image-correction-in-qml</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 11:10:58 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/155910.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Apr 2024 06:49:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Image Correction in QML on Thu, 11 Apr 2024 05:36:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dheerendra">@<bdi>dheerendra</bdi></a> Thank you, Now I have written like this:</p>
<pre><code>Image{
        id: opencvImage
        width: 0.99*parent.width
        height:0.99*parent.height
        anchors.centerIn: parent
        fillMode: Image.PreserveAspectFit
        property bool counter: false
        visible: true
        source: "file:///C:/Users/hp/Pictures/11.jpg"
        asynchronous: false
        cache: true

    }
</code></pre>
<p dir="auto">and the output is like this:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/0b1be2e5-4ee0-4316-9e0d-f6ee3eddf321.png" alt="Screenshot 2024-04-11 110207.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">What goes wrong? Actually ,What I have been working is: sending the image path from the file browser in qml to the backend C++ which uses Opencv for image processing the image and send that image using QImage to QML displaying window.. where does it goes wrong if I send from C++ to QML rather than directly displaying it?</p>
]]></description><link>https://forum.qt.io/post/796454</link><guid isPermaLink="true">https://forum.qt.io/post/796454</guid><dc:creator><![CDATA[Vijaykarthikeyan]]></dc:creator><pubDate>Thu, 11 Apr 2024 05:36:22 GMT</pubDate></item><item><title><![CDATA[Reply to Image Correction in QML on Tue, 09 Apr 2024 13:47:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vijaykarthikeyan">@<bdi>Vijaykarthikeyan</bdi></a><br />
Looks like you are loading the image using QImageLoader.<br />
Can you load the image with simple code like this ?</p>
<pre><code>Image {
   source : "water.png"
}
</code></pre>
<p dir="auto">See how this goes.</p>
]]></description><link>https://forum.qt.io/post/796278</link><guid isPermaLink="true">https://forum.qt.io/post/796278</guid><dc:creator><![CDATA[dheerendra]]></dc:creator><pubDate>Tue, 09 Apr 2024 13:47:12 GMT</pubDate></item></channel></rss>